start_backtest
Launch a MetaTrader backtest in the background and immediately get a run_id. Poll get_backtest(run_id) until status is no longer running to retrieve the report path and journal notes.
Instructions
Launch a backtest in the background and return immediately with a run_id.
Poll get_backtest(run_id) until status is no longer "running"; the final record carries
report_path and journal_notes. Runs are also written to .mt5tmp/runs/<run_id>.json
next to the ini. Only one terminal per install can test at a time.
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": {
"config": "<config>"
},
"name": "start_backtest"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | Yes | Absolute path to the tester.ini file. | |
| portable | No | Pass /portable so the terminal uses its install folder as data folder. | |
| timeout_sec | No | Kill the terminal if it has not exited after this many seconds. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||