backtest_run
Backtest one built-in strategy with one set of parameters. Fills happen at the next bar's open and costs are charged per side. Returns risk-adjusted metrics alongside the raw return — judge on those, not on total return.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | Reuse a handle from market_candles instead of loading. | |
| feeBps | No | Per side. Default 4. | |
| market | No | Default: the chart. | |
| params | No | ||
| symbol | No | Default: the chart. | |
| exchange | No | ||
| direction | No | ||
| timeframe | No | e.g. 1h, 4h. Default: the chart. | |
| strategyId | Yes | ||
| maxBarsHeld | No | Optional time stop in bars. | |
| slippageBps | No | Default 1. | |
| stopLossPercent | No | Optional protective stop percentage. | |
| takeProfitPercent | No | Optional profit target percentage. |