Why an EA works in backtest but fails live

Why Your EA Works in Backtest but Fails Live: 7 Causes and How to Fix Them

It is one of the most frustrating experiences in automated trading: an Expert Advisor shows a beautiful backtest, you put it on a live account, and the results look nothing alike. The good news is that the gap almost always has identifiable causes. Here are the seven most common reasons an EA works in backtest but fails live, and how to fix each one.

1. Unrealistic Spread and Commission

Backtests are often run with a fixed, low spread and no commission. Live spreads widen at session opens, during rollover and around news, and ECN accounts charge commission per lot.

Fix: backtest with your broker's real tick data and spread, add commission, then rerun with a wider spread. If the edge disappears, the EA is too cost-sensitive for your account.

2. Slippage and Latency

In the tester, orders usually fill instantly at the requested price. Live, they take milliseconds to reach the broker, and fast markets fill at worse prices. Scalpers and M1 gold EAs are the most affected.

Fix: enable delays in the MT5 Strategy Tester, run the EA on a low-latency VPS close to your broker, and use an ECN or raw-spread account.

3. Poor Modelling Quality

Testing on "Open prices only" or "1 minute OHLC" can invent fills that never happened, especially for strategies with tight stops or take profits inside a single candle.

Fix: validate on "Every tick based on real ticks". Our MT5 backtesting guide explains each mode.

4. Overfitting (Curve Fitting)

An EA optimized until its backtest looks perfect has often memorized past noise. When the market behaves slightly differently, the edge vanishes.

Fix: keep an out-of-sample forward period, prefer stable parameter zones over single peaks, and optimize as few inputs as possible.

5. Broker and Symbol Differences

The same symbol can differ between brokers: contract size, digits, minimum stop level, swap rates, trading hours and symbol suffixes (XAUUSD, XAUUSD.m, GOLD). An EA tuned on one broker's data may misbehave on another.

Fix: backtest on the data of the broker you will trade, check the symbol specification, and confirm the EA recognizes your symbol name.

6. Time Zone and News Filter Mismatches

Session filters, Friday close rules and news filters depend on the broker's server time (GMT offset) and daylight saving changes. A filter that worked in the tester can be shifted by hours live. Many news filters also do not work in the Strategy Tester at all, so the backtest includes trades the live EA would skip, or the other way around.

Fix: verify the broker's GMT offset, check the EA's time settings, and review how it handled past news days. See our gold news trading guide.

7. Market Regime Change and Short Live Samples

A strategy can be genuinely profitable and still lose for weeks when the market changes character, for example from ranging to strongly trending. A few weeks of live results are also too small a sample to judge.

Fix: compare live results with the backtest over the same period, not with the long-term average, and judge the EA over enough trades. Size positions for the worst drawdown, as explained in our EA risk management guide.

A Simple Live-vs-Backtest Check

  1. Run the EA live or on demo for 2 to 4 weeks.
  2. Backtest the exact same dates with the same settings on real ticks.
  3. Compare trade by trade: number of trades, entry times, average win and loss.
  4. Missing trades point to filters or time zones; similar trades with worse results point to spread, slippage or commission.

With MQ5 source code, you can go further and log every decision the EA makes to find the exact cause. Read our MetaEditor guide to get started.

FAQ

Is it normal for live results to be worse than the backtest ?

A modest gap is normal because of real costs and execution. A large gap usually means one of the causes above.

How long should I forward test an EA ?

At least 2 to 4 weeks on demo, and long enough to collect a meaningful number of trades for the strategy's frequency.

Can a VPS fix a failing EA ?

It fixes execution and uptime problems, not a strategy without an edge.

Conclusion

Backtests lie mainly through costs, execution, modelling, overfitting and settings mismatches. Test realistically, compare like with like and judge over enough trades. Browse our MT5 expert advisors and test them with this checklist before going live.

Past performance, including backtested results, does not guarantee future results. Trading involves significant risk of loss.

Back to blog