◆ New — Strategy Validator, Code Fixer & Prop Compliance Checker are live. Try one free →
Home / Learn / Why MetaTrader Backtests Don't Match Live Results
MetaTrader

Why MetaTrader Backtests Don't Match Live Results

Why an EA that looks strong in the MT4/MT5 Strategy Tester behaves differently on a live account: tick modeling and interpolated price paths, fixed versus floating spread, execution latency, slippage and requotes, swap and commission, and broker data differences — each explained mechanically rather than hand-waved, with concrete ways to make the comparison more honest. Educational material only, not financial advice: even a carefully modeled backtest is a description of the past, not a forecast, and live trading carries a real risk of loss.

Why does my EA perform differently live than in the strategy tester?

Because the Strategy Tester is a simulation with optimistic defaults: it replays a reconstructed price path, fills every order instantly at the simulated price, and — depending on your settings — may assume a fixed spread, zero latency, no requotes, and simplified swap. A live account replays none of those courtesies. The gap between backtest and live is therefore not one mystery but the sum of several specific, mostly quantifiable differences, and the productive move is to attribute your gap to them one at a time.

The five that matter, roughly in order of how often they dominate:

  1. Tick modeling — the tester may never have seen the intrabar price path your live EA actually traded through.
  2. Spread — MT4 backtests use a fixed spread; live spread floats, and it spikes exactly when many EAs trade.
  3. Execution — latency, slippage, and requotes exist live and (mostly) not in the tester.
  4. Costs — swap and commission are easy to misconfigure or omit in a backtest.
  5. Data — your broker's feed, GMT offset, and symbol conventions can differ from the data you tested on.

A useful framing from the outset: some of these are biases (they push results in one predictable direction — spread widening and slippage are nearly always against you) while others are noise (feed differences can cut either way). Strategies with small average profits per trade — scalpers, tight-stop systems — are hit hardest, because a fixed cost gap consumes a larger fraction of a small edge. Everything below is educational only; the aim is honest measurement, not a promise that any EA works.

Tick modeling: what price path did your backtest actually see?

MetaTrader stores history as OHLC bars, not ticks — so when you backtest "Every tick" in MT4, the tester fabricates an intrabar path by interpolating from M1 data using a fixed set of assumptions about how price moved between the open, high, low, and close. That is why MT4's modelling quality tops out at 90%: the last 10% is an admission that the tick sequence is invented. Whether the high or the low of a bar was touched first is a guess, and for any EA whose stop-loss and take-profit can both fit inside one bar, that guess decides whether the trade is recorded as a winner or a loser. Tight-stop strategies can flip from apparently strong to apparently poor purely by changing tick assumptions.

MT5 improves on this materially with the "Every tick based on real ticks" mode, which downloads the broker's actual recorded ticks where available and replays them — including, crucially, each tick's real bid/ask. Two caveats keep it from being a perfect record. First, tick history typically extends back only a few years and varies by broker; beyond it, MT5 silently falls back to generated ticks, so a ten-year "real tick" backtest is usually a splice of real and synthetic regimes. Second, real ticks are the record of one broker's feed — test on broker A's ticks and trade on broker B and you are back to comparing different price paths.

The cheaper modes — "1 minute OHLC", "Open prices only" — are fine for coarse logic checks but should never be the basis for judging any strategy that manages positions intrabar. If your live trades are being stopped out in ways the backtest never showed, the tick model is the first suspect.

Spread: fixed in the tester, floating and spiky live

The MT4 tester applies one fixed spread to the entire backtest — either the current spread at the moment you pressed Start, or a value you type in. Live spread on a floating-spread account is a moving quantity: tight during liquid London/New York hours, wider in the Asian session, and dramatically wider for seconds-to-minutes around news releases and the daily rollover period (roughly 5pm New York), when liquidity providers pull quotes.

The arithmetic is mechanical and worth internalizing. On EUR/USD, one standard lot is 100,000 units, so one pip of spread costs $10 per standard lot per round trip. If you backtested at a fixed 1-pip spread but your live entries — say, a breakout EA that fires during news — actually execute at 3 pips, every trade starts $20 per lot deeper in the hole than the tester assumed. For a strategy averaging 5 pips per trade, that unmodeled 2 pips is 40% of the edge, gone before any other discrepancy is counted. This is also why spread errors are a bias, not noise: widening is always against you.

MT5 with real-tick modeling replays the recorded bid/ask of each tick, so historical spread variation is genuinely represented — one of the strongest arguments for that mode. With generated ticks, you are back to an assumption.

You can measure your own exposure instead of guessing. Run this data collector on a demo chart for a week and read what spread your EA would actually meet at its trading times:

5
// Educational only — validate before trading; not financial advice.
void OnTick()
  {
   long spreadPts = SymbolInfoInteger(_Symbol, SYMBOL_SPREAD);
   PrintFormat("%s %s spread=%d points",
               _Symbol, TimeToString(TimeCurrent(), TIME_SECONDS),
               (int)spreadPts);
  }

Comparing that log against your backtest's assumed spread often explains most of a live shortfall on its own.

Execution: latency, slippage, requotes, and off-quotes

In the tester, an order is filled the instant it is issued, at exactly the simulated price. Live, an order travels from your terminal (or VPS) to the broker's server and onward to a liquidity provider, and the price can move during that journey. What happens next depends on the execution model:

  • On instant execution accounts (common on MT4), a price moved beyond your allowed deviation triggers a requote — the order is rejected with a new price offer. Your backtest contained zero requotes; your live EA may miss its best entries precisely because fast markets are when requotes happen. An EA that doesn't handle the requote/off quotes error gracefully simply skips those trades, and the skipped trades are not a random sample.
  • On market execution accounts (standard on MT5), the order always fills, but at the available price — that difference is slippage. Slippage on limit-style entries can occasionally be favourable; slippage on stop orders and stop-losses in fast markets is systematically adverse, because you are demanding liquidity in the direction everyone else is.
  • Gaps are the extreme case: a stop-loss inside a weekend or news gap fills at the next available price, not the level you set. The tester's reconstructed path frequently steps politely through levels the real market jumped over.

Latency compounds all of this. A strategy reacting to tick-level moves from a home connection hundreds of milliseconds from the broker's server is trading a different market from the zero-latency tester. None of this is exotic: it is ordinary market microstructure. But every element pushes the same direction — live fills are, on average, worse than tester fills — and strategies that trade often and win little per trade absorb the largest proportional hit.

Swap, commission, and broker data differences

Costs the tester forgets. Positions held past the daily rollover pay or receive swap, and most brokers apply a triple charge one day a week (commonly Wednesday) to account for weekend settlement. Swap rates also change over time — the tester applies the symbol's current rates to the whole history, which misstates carry costs for multi-day strategies during periods when rates differed. Commission is the simpler trap: if your live account charges per-lot commission and the backtest was run with commission unset (MT4 has no native commission field; MT5 custom symbols and some brokers model it), every round trip in the backtest was silently cheaper than reality.

Data the tester never saw. Your broker's feed is one record among many. Different liquidity aggregation means different highs and lows on the same bar — enough to decide whether a stop was hit. The broker's GMT offset shifts where daily candles open and close, which changes every daily-bar indicator value, pivot level, and "trade at the open" rule; a server on UTC+2/+3 (aligned to New York close) produces five daily candles a week, while other offsets produce a Sunday stub candle that shifts everything after it. Test on data with one offset and trade a broker with another and your indicator values genuinely differ — noise rather than bias, but divergence all the same.

Add the small conventions: 4-digit versus 5-digit quotes changing what "a point" means to spread and slippage filters, suffixed symbols with different contract specifications, and stop/freeze levels enforced live that the tester ignored. Each item is small; a backtest that gets four of them wrong at once is describing an instrument that does not exist.

How do I make backtests and live results comparable?

You cannot make the tester identical to a live account, but you can shrink the gap from "mystery" to "measured":

  1. Use MT5 real-tick modeling on your own broker's data, and note where real ticks end and generated ticks begin — treat conclusions drawn from the generated region with proportionally less confidence.
  2. Stress the costs, don't idealize them. Re-run the backtest at the worst spread your logging showed for your trading hours, add a fixed adverse slippage per trade, and include commission and swap explicitly. If the strategy's tester performance cannot survive honest costs, that is a result, not an inconvenience.
  3. Forward-test on a demo account, then compare trade-by-trade. Run the EA live-demo for a meaningful period, then backtest the same period on the same broker's data and line the trade lists up. Matching signals with worse fills points at execution; missing or extra signals point at data or tick modeling; drifting indicator values point at GMT offset or feed differences. This attribution is exactly the kind of systematic check ForexCodes' audit tooling exists to make routine.
  4. Log everything live. Requested versus filled price, spread at entry, rejection codes. A month of logs turns "live is worse" into "live costs 1.8 pips per round trip more than modeled," which is actionable.

And the honest frame to end on: closing the backtest-live gap makes your measurement trustworthy — it does not make the strategy good. A backtest, however carefully modeled, is a statement about one historical path. Educational only, not financial advice; past results never guarantee future performance, and live trading carries a real risk of loss.

Key takeaways

Educational only — not financial advice. Trading involves substantial risk of loss.

Catch the bug that compiles.Run auditGet Pro