QuantForge
en

The Strategy Tester

Open it with Strategy Tester at the top of the editor. It runs your strategy against imported history with the same rules as the EA you export.

Setup

Setting Notes
History One of your imported datasets
Chart timeframe What PERIOD_CURRENT means for the strategy. It can’t be finer than the history.
Model 1-minute OHLC (accurate, default) or Open prices only (fast)
From / To Inclusive dates; 1Y / 3Y / 5Y count back from the end of the history
Deposit, leverage The account is in USD
Account MT5 only: hedging (independent positions) or netting (one position per symbol). MT4 is always hedging.
Spread From the history where it has one, otherwise the fixed value
Commission USD per lot, charged when opening and again when closing
Slippage Points against you on market entries and closes (not on stop-loss or take-profit fills)
Swap Points per lot per night; Wednesday night counts three times
Inputs Values for this run only

A few months before the start date are loaded as well, so indicators are settled on the first bar.

How prices move inside a bar

With 1-minute OHLC each M1 bar becomes four ticks: open, low, high, close for a rising bar and open, high, low, close for a falling one, as MetaTrader’s tester assumes. Your onTick graph runs on every tick. A stop loss or take profit crossed inside a bar fills at its level; one jumped over by a gap fills at the new price. Buy positions close at the bid, sells at the ask.

Open prices only runs onTick once per chart bar, at its open. Stops are still checked along each bar’s path. It’s much faster and fine for strategies that act only on new bars.

The chart and playback

After a run, Chart shows the candles with the indicators your conditions use, an arrow for every entry, a dot for every exit, and the stop loss and take profit of positions open at the cursor.

  • Play / Pause, step one bar back or forward, jump to the start or the end
  • Speed from 1× to 1000× (bars per second), a date picker and a slider to jump anywhere
  • While the chart is open, the onTick canvas lights up the blocks for the bar under the cursor: amber passed, red evaluated false, green ran

Reading the results

  • Report: net profit, profit factor, maximum drawdown (money and percent), recovery factor, Sharpe ratio (annualised from daily equity), win rates, averages, streaks, costs. The box underneath lists anything about the strategy or data that could make results differ from a live account. Read it.
  • Equity: balance and equity over time, with the drawdown from the running peak underneath.
  • Trades: every closed trade with its exit reason. Click one to jump the chart to it.
  • Monthly: closed-trade profit per month as a percent of the balance at the start of that month.
  • Log: rejected orders, alerts, stop-outs and other messages.

Each run is saved to the project. The template library shows your latest run of each template.

Confirming in MetaTrader

The report’s MT5 tester .ini and Inputs .set buttons export the run’s settings. Compile the EA into MQL5\Experts, then start the terminal with terminal64.exe /config:"<path to the .ini>", or load the .set in the tester’s inputs tab. Small differences are normal: MetaTrader generates more ticks inside each minute, and your data and your broker’s may differ.

Limits

Free plan runs use H1, H4 or D1 and cover up to one year. Pro allows M1 to D1 and the full history.