← All articles

Robot testing

Why gold robots need real-tick backtests

MT5 offers several ways to simulate price. For XAUUSD, the wrong choice can turn a losing EA into a beautiful equity curve.

Published 21 October 2026By PGFX6 min read

Gold is one of the most popular symbols for expert advisors, and one of the easiest to fool yourself on. Its wide intraday range and sharp news moves make backtests very sensitive to how the tester rebuilds price inside each bar. MetaTrader 5's Strategy Tester gives you a choice of models, and that choice matters more on XAUUSD than on almost any other pair.

The MT5 tick models

ModelHow price is builtGood for
Every tick based on real ticksUses recorded broker ticks, including the spread at each tickFinal validation, scalpers, grid and basket systems
Every tickGenerates synthetic ticks inside each M1 barRough logic checks
1 minute OHLCOnly four prices per M1 barFast optimisation of slow strategies
Open prices onlyOnly the bar openEAs that act strictly on bar open

Why generated ticks flatter gold EAs

  • Spread is smoothed: generated modes typically use the spread from bar data or a fixed value, so the rollover and news spikes that hit gold are missing. Stops that would have been triggered by a spread spike never fire.
  • Path inside the bar is invented: when both take-profit and stop-loss sit inside one M1 range, the generator decides which was touched first. On fast gold bars that guess often favours the strategy.
  • Grid and basket systems look safer: systems that close many small baskets are especially sensitive. A few points of missing spread on every close adds up to a large difference over thousands of trades.

A practical XAUUSD test checklist

  1. Use real ticks from the broker you plan to trade, and check that the history has no large gaps.
  2. Cover several regimes: a strong trend year, a ranging period and at least one high-volatility shock.
  3. Hold back out-of-sample data: optimise on one period and confirm on a later one you did not touch.
  4. Stress the spread: rerun with spread doubled, and once more with a news-hour level, to see how much edge survives.
  5. Read drawdown first: maximum equity drawdown, not balance drawdown, especially for systems that hold floating losses.
  6. Count the worst losing streak and ask whether you could sit through it live.
  7. Forward-test on the same broker before using real money.

Common gold-specific traps

  • Symbol differences: XAUUSD, XAUUSD.m or GOLD can have different contract sizes and digits. Read the symbol specification before trusting lot-based risk.
  • Server time: session filters written for one broker's time zone shift by hours on another. Use broker-independent time logic or make the offset an input.
  • Swap: long-holding gold positions pay or receive swap every night, with a triple charge on one weekday. Include it in the test.

Rule of thumb: if an XAUUSD robot's results change a lot between real ticks and generated ticks, trust the real-tick result and treat the difference as the size of the illusion.

← More articles Ask on Telegram →