Backtest Strategy
backtest_strategyBacktests a rule-based strategy on TraderWAI historical 1-minute data and returns every trade plus a summary (win rate, total R, drawdown). It is a calculation on the server, with no AI involved. Levels can be daily references so the rule works every day: {"ref":"session_high","session":"asia"} (asia 00:00-07:00, london 07:00-16:00, new_york 13:00-21:00 UTC), {"ref":"range_high","start":"00:00","end":"06:00"}, {"ref":"prev_day_low"}; the rule is armed each day once its levels are known. Indicator levels: {"ref":"indicator","indicator":"sma|ema|rsi|atr|highest|lowest","timeframe":"D1","period":50}, {"ref":"price"}, {"ref":"day_open"} or {"ref":"day_high","daysAgo":2}, combined with compare (e.g. price above the D1 EMA 50) and candle_direction; indicators use closed candles only. Example ("buy EUR/USD when it breaks the Asian high"): symbol EUR_USD, conditions [{"type":"close_above","timeframe":"M15","level":{"ref":"session_high","session":"asia"}},{"type":"time_window","start":"07:00","end":"12:00"}], trade {"side":"buy","stop":{"type":"level","ref":{"ref":"session_low","session":"asia"}},"target":{"type":"rr","value":2},"closeAt":"20:00"}. Example ("buy gold on the first retest of a bullish M15 fair value gap in London"): conditions [{"type":"fvg_retest","timeframe":"M15","direction":"bullish","maxCandles":20},{"type":"time_window","start":"07:00","end":"12:00"}], trade {"side":"buy","stop":{"type":"wick","bufferPips":10},"target":{"type":"rr","value":2}}. Limit entries ({"type":"limit","at":{"type":"fvg","point":"midpoint"},"expiryMinutes":60}) and time exits (maxMinutes, closeAt) are supported. Not supported: other chart patterns (head and shoulders, triangles…), order blocks, news, trailing stops. History: forex, gold and crypto since late May 2026; indices and oil about 1 year. The period and the number of backtests per day depend on the TraderWAI account. Works with the market closed (weekends).
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": {
"symbol": "<symbol>",
"conditions": "<conditions>",
"trade": "<trade>"
},
"name": "backtest_strategy"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End (ISO 8601, default now) | |
| days | No | Period: the last N days (default 7) | |
| from | No | Or an explicit start (ISO 8601) | |
| trade | Yes | Side, stop, target and optional daily close time | |
| symbol | Yes | Symbol (e.g. EUR_USD, XAU_USD, NAS100_USD). | |
| conditions | Yes | Entry rule (all conditions must be met, max 5) | |
| spreadPips | No | Spread in pips added to buy entries (default 0) |