Your Gold EA Backtest Was Beautiful. Live MT5 Didn't Get the Memo.
The Strategy Tester has delivered its verdict: your gold EA is apparently a genius.
The curve climbs neatly. The drawdown looks civilised. You can almost hear a tiny orchestra celebrating inside MetaTrader 5.
Then you run the same EA on a demo or live account.
The first entry is different. A second position appears where the backtest showed none. The exit takes longer. Your glorious historical report suddenly feels like a travel brochure for a country you never visited.
Before accusing your EA of having two personalities, consider the less dramatic explanation: the tester and the current market are not the same environment.
A backtest is a replay, not a rehearsal of tomorrow
MT5 Strategy Tester evaluates a strategy against historical prices and a particular set of assumptions. The live terminal receives new quotes and sends actual requests into the broker's trading environment.
A backtest can answer: "What would these rules have done on this history, using this test configuration?"
It cannot answer: "What exact sequence of fills will happen next Friday?"
That distinction matters for XAUUSD, where a strategy can be sensitive to tiny differences in quote timing, spread and entry price.
The tick that changed the story
Imagine a hypothetical EA with a price-based entry and a second position added only after a defined adverse move.
In the test, the first position opens at 2,500.00. Price moves against it, but not quite far enough to trigger another position.
In a separate hypothetical live session, the initial fill is 2,500.40. With the same numerical distance rule, the next trigger is now at a different absolute price. A price path that missed the test's second-entry level could reach the live one.
The EA rules are unchanged. The basket isn't.
This is why comparing only the last line of two reports is like comparing the ending of two films while ignoring everything that happened in the middle.
For multi-position systems, one early difference can cascade into position count, average entry, floating drawdown, margin usage and exit timing.
"Every tick based on real ticks" is not a crystal ball
MT5 offers several testing modes. "Every tick based on real ticks" uses historical tick data when available and can better represent the intrabar Bid/Ask path than simplified generated modes.
That is useful. It is not magic.
Historical ticks are still yesterday's ticks. They do not recreate tomorrow's liquidity or guarantee tomorrow's execution price. Even a detailed test is tied to the selected broker's available history, symbol specification and simulation settings.
If your EA reacts to very small price movements, testing mode is not a cosmetic dropdown. It can change the sequence of trades.
Spread: the tiny number with a surprisingly large attitude
Spread is the difference between Ask and Bid. A buy generally opens at Ask and closes at Bid; a sell generally opens at Bid and closes at Ask.
A strategy that looks profitable with tight spreads may behave differently when spreads widen. Spread can affect not only costs but also whether price-sensitive entry and exit conditions are met.
Historical real-tick testing may include historical spread variation captured in that tick history. Generated modes simplify the price path. Live spreads can change with liquidity, session transitions and news.
Don't compare two results as though spread were a fixed tax stamped onto every trade. For some EAs, it changes the decision path itself.
Execution: the part your chart cannot promise
A tester simulates trading. MT5 also offers execution-delay modelling to help examine sensitivity to delays.
A live order has to reach a broker server and be processed under the applicable execution and filling rules. Prices can move while that happens. Depending on order type, broker and market conditions, the result can be a different fill, partial fill, rejection or no fill.
The same instruction does not guarantee the same completed transaction.
When a trade differs, check the terminal's Experts and Journal logs and the account's order/deal history before guessing at the cause.
A controlled comparison beats a dramatic conclusion
Suppose you want to investigate why two XAUUSD tests differ. Keep these factors aligned as far as practical:
- Symbol and broker environment. Check contract size, digits, tick size, trading sessions and historical feed.
- Date range and modelling mode. A generated-tick run and a real-tick run are different experiments.
- EA build and inputs. Confirm the same version, entry rules, volume settings and protections.
- Starting deposit, account currency and leverage. These influence margin capacity and how you interpret risk.
- Costs and execution assumptions. Review spread, commission, swaps and any tester delay configuration.
Then compare trade sequences, not just net profit. Find the first point of divergence: was there a different quote, a different signal, a rejected order, or a changed fill? Work forward from there.
That approach is less exciting than announcing that the market is rigged. It is also much more useful.
Four questions to ask before trusting the green curve
Did the strategy survive difficult periods? A smooth final equity line can conceal a very uncomfortable journey.
What happened to equity while trades were open? Balance can remain calm while floating losses grow. Equity drawdown and margin pressure deserve attention.
Does one unusually good period explain most of the profit? A strategy that relies on a narrow market regime may be fragile when conditions change.
Does it still make sense outside the sample? Try a genuinely separate historical period and observe the EA on demo under current conditions. Avoid repeatedly tweaking parameters until the same historical data looks perfect; that can reward curve-fitting rather than robustness.
A practical diagnostic example
This is an illustration, not an actual trading result.
A backtest shows 120 entries and a positive final balance. A forward demo run over a different period shows 90 entries and a negative result.
That alone does not prove a coding defect. The periods may have had different volatility, spread and market structure. Nor does it prove the EA is healthy.
A useful investigation would compare matched conditions where possible, inspect the logs, verify input settings and review how each trade decision followed the strategy rules.
Different outcome and incorrect implementation are not synonyms.
What should match?
The thing worth demanding is logical consistency.
If the EA is designed to enter after a particular confirmed condition, does it recognise that condition correctly? Does its position sizing follow the configured rule? Does it respect its protections and account constraints? Does it respond correctly to broker trade errors?
Those are testable questions.
Exact future prices, identical basket counts and identical returns are not promises any honest backtest can make.
The Strategy Tester is a laboratory. A live account is the world outside the laboratory. Both are useful, but one should not be mistaken for the other.
Use a backtest to understand a system's behaviour under defined historical conditions—not to order the future to behave itself.
Historical performance does not guarantee future results. Automated trading involves substantial risk, including losses greater than expected under adverse market conditions.


