NinjaScript Backtest Benchmark
If an AI agent uses backtest results to decide whether to deploy a strategy, the backtest engine has to be the one that runs the strategy live. CrossTrade MCP's RunStrategyBacktest drives NT8's actual Strategy Analyzer engine. Single backtests are bit-identical to NT8's UI. This page is the public proof.
The deploy gate is only as good as the backtest
An agent that backtests in some other engine and then deploys to NT8 is comparing apples to oranges. Different fill logic, different slippage handling, different bar treatment. The numbers it shows you may have nothing to do with what the strategy will produce live. CrossTrade MCP avoids the problem by driving the same Strategy Analyzer engine that runs in the desktop UI.
Benchmarks matter even more for vibe-coded strategies. A generated strategy is only useful if the compile and backtest loop can be trusted. This page exists to show that CrossTrade MCP can reproduce Strategy Analyzer behavior and give agents a reliable verification path instead of leaving traders with pasted code and guesses. The agent's deploy decision is only as good as the backtest engine it depends on.
Reference parameters
How to reproduce
- In NinjaTrader 8, open Strategy Analyzer.
- Select SampleMACrossOver, MES 06-26, April 1 to April 30, 2026, 5-minute bars.
- Set Fast=10, Slow=25, Sim101, commission $0, slippage 0 ticks.
- Run a single backtest. Record NetProfit, ProfitFactor, Sharpe, and TradeCount.
- In an MCP client, call:
RunStrategyBacktest({
strategy: "SampleMACrossOver",
instrument: "MES 06-26",
from: "2026-04-01",
to: "2026-04-30",
bars_period: { type: "Minute", value: 5 },
account: "Sim101",
parameters: { Fast: 10, Slow: 25 },
commission: "0",
slippage_ticks: 0
}) - Compare the returned metrics block to the UI numbers.
Parity
Single backtests are bit-identical to NT8's UI under the documented parameters. The trades, the metrics, and the fills agree.
Raw summary JSON
The exact metrics block returned by RunStrategyBacktest for the reference run is available alongside this page. Re-run the reference and compare your output line by line to confirm parity in your install.
What parity does and does not prove
- Parity proves the engine is the same. It does not predict future trades.
- Single-backtest parity does not imply parameter-sweep optimality is meaningful. Sweeps still overfit.
- Commission and slippage are zero for the reference; live conditions differ. Use realistic numbers for production decisions.
- Different NT8 versions and different add-on versions are tested at release time. Confirm with
GetMcpCapabilitiesif you suspect a mismatch.
Frequently asked questions
What does "bit-identical" mean here?
Same trades, same fills, same metrics for the documented parameters. The numbers match.
Why SampleMACrossOver?
It ships with NT8, has well-known behavior, and is easy for any user to reproduce.
How often is this benchmark updated?
After Add-On version changes that touch the backtest engine, and after material NT8 updates.
Where do I find the last run date?
On this page after every refresh. Treat the last run date as the freshness signal.
Run the same backtest yourself
SampleMACrossOver, MES 06-26, April 1 to 30, 2026. Five minutes in NT8, five seconds in MCP. The numbers should match.