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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"strategyId": "<strategyId>"
},
"name": "backtest_run"
}
}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. |