ProEA Lab · MT5, TradingView and trading research · Evidence standards
Systems

How to Backtest an EA in MT5 (Strategy Tester, Step by Step)

MT5's Strategy Tester will print a beautiful equity curve for a broken idea — the settings decide whether the answer means anything. Here's the full setup: where the tester hides, the modelling mode that actually simulates your stops, the three settings everyone skips, and how to read the report without fooling yourself.

PL · 3 min readUpdated
A brass model aeroplane inside a glass wind-tunnel chamber on a dark laboratory bench, smoke lines streaming over its wings — poster titled Test Before Trust.

A backtest is an interview, and your settings write the questions.

The defaults ask softballs. Here's how to make the tester hostile — and why only that version is worth trusting.

How do I run a backtest in MT5?

Press Ctrl+R (or View → Strategy Tester), and the tester panel docks at the bottom of the terminal. Work top to bottom through its Settings:

  1. Expert: Pick the EA from the dropdown. It lists whatever is compiled under MQL5\Experts (install guide here).
  2. Symbol and timeframe: Choose the market the EA was built for. Both matter. An M1 scalper tested on H1 is a different system.
  3. Date: Choose Custom period and set real dates. Include ugly regimes on purpose, especially ranges and news spikes. Make sure the year the trend died is in there.
  4. Modelling: The setting that decides everything — next section.
  5. Deposit and leverage: Match your actual account. Margin behaves differently at real size. Finding out live that "it only failed at scale" is ugly.
  6. Start: It's at the bottom right. The first run on a symbol downloads its price history. The progress bar at the bottom is doing real work, so let it finish.
Hand-drawn sketch of the Strategy Tester panel: a vertical side label, stacked rows of blank dropdown fields and date boxes, and the Start button circled in orange at the bottom right.
The tester docks at the bottom of the terminal. Every row is a question you're about to ask.

Which modelling mode should I use?

Every tick based on real ticks is the right mode when your broker serves tick history. It replays the actual recorded ticks with spreads included, and it's the only mode that tests your stops honestly. Every tick (generated from one-minute bars) is the fallback.

Use Open prices only for rough scans of systems that act strictly on bar close. Nothing that uses a stop-loss belongs there.

What happens inside a bar is the reason. Your stop and your target can both sit within one candle's range; only tick-level simulation decides which was hit first, and that decision is your win rate. Coarser modes guess.

Two cautions. Real-tick mode's first run downloads a lot of data, including gigabytes on long ranges. Start with a year, not a decade.

And ticks are your broker's ticks. The same EA on another broker's feed is a slightly different backtest. That's normal, and it's the first reason backtests diverge from live results.

Hand-drawn sketch of the Modelling row in the Strategy Tester with its dropdown menu open and the top option highlighted in orange.
One dropdown decides whether your stops were simulated or guessed. Pick from the top.

The three settings people skip

Delays. The default is Zero latency, ideal execution: fills come instantly at the exact price, every time.

No live account has ever experienced this. Set a realistic delay and watch scalping edges shrink; the ones that survive are the real ones.

Forward. The tester can hold out a slice of your date range (say, the final third) as a forward window. Tune on the first part, then verify on the held-out part.

If performance collapses on data the tuning never saw, you optimized noise. Better to learn it here than live.

Profit in pips. This small checkbox restates results per-pip instead of per-dollar, skipping deposit-currency and margin effects — which is exactly why it makes the same logic comparable across symbols.

How do I read the result without fooling myself?

Trade count comes first. A few dozen trades amount to an anecdote, nowhere near a distribution, so judge nothing on them.

Once the sample is real, read the per-trade numbers before the curve. Start with expectancy in R, not dollars, then compare maximum drawdown with what you'd actually sit through.

The curve you're admiring is one path through history. Resampling the trade list shows how wide "this exact system" really runs across the distribution of paths.

And the gap between a modelled curve and a live account has structural causes no setting removes. Feed and slippage matter. So does the regime after your data ends.

Our EA's page separates its historical simulations and execution-delay tests. The 24 independent monthly simulations use generated ticks and reset the deposit each month; they are not a documented walk-forward study or a continuous account history. Read each dataset's settings and limitations before comparing results.

Editorial panel on ivory paper reading: A beautiful curve is one bad setting away — with an orange underline under one bad setting.
The tester manufactures beauty on request. Settings are the request.
The tester answers exactly the question your settings ask. Ask a hard one — real ticks, real delays, dates that include the pain.

Continue reading

Walk-Forward Testing: Steps, Example and Limits

Optimize on earlier data, freeze the rules, test on the next unseen period and repeat. A dated walk-forward example, efficiency pitfalls and MT5 forward-test limits.

Aug 10 · ProEA Lab

A brass stencil sliding along a long paper chart strip, exposing only one unmarked section at a time while the rest stays covered — poster titled Judge the Unseen Part.

How to Install an EA on MT5: EX5, MQ5 and Fixes

Install an EA in MT5's Experts folder, compile MQ5 source, attach it to a chart, and check trading permissions, missing files and broker sessions.

Jul 14 · ProEA Lab

A hand lowering a small brass clockwork trader figurine into a fitted socket on a dark wooden desk console etched with a candlestick chart — poster titled Install the Machine.

EA Backtest vs Live Results: The Gap Is the Tell.

EA backtest vs live results — the live account always runs a little worse, and every honest quant knows why. Here's the arithmetic of the gap, what's normal, what's a red flag, and how to use it to read any seller in twenty minutes.

Jul 10 · ProEA Lab

A smooth glowing backtest equity curve above a rougher live curve, the gap between them pinned open like a measured specimen — poster titled Backtest vs Live: the gap is the tell.