Guide · Validation
Gold robot backtest guide: validate an XAUUSD EA before going live
A good backtest does not prove a robot will make money. It proves the strategy is robust enough to deserve a small, careful live test. This guide shows how to run one properly.
Last updated: 18 August 2026
Use real tick data
In the MT5 Strategy Tester, select "every tick based on real ticks" and use at least 12 months of data from your broker. Real ticks reproduce the actual spread and price movement, which is critical for a scalping or intraday gold EA.
If your broker does not provide enough tick history, the test is less reliable. Consider downloading additional data from a trusted source or switching to a broker with deeper history.
Set spread and commission correctly
Gold spreads vary widely. Use the average spread you see during your main trading session, not the tightest spread of the day. Add commission if your account charges it per lot.
A strategy that looks profitable with a 15-point spread may fail with a 35-point spread. Always test a range of spread values to see how sensitive the result is.
Look at the right metrics
Focus on profit factor, maximum drawdown, consecutive losses and total number of trades. A profit factor above 1.3 with a max drawdown under 15% and at least 200 trades is a reasonable starting point.
Ignore the final return until you understand the drawdown. A 300% return with a 60% drawdown is not the same as a 50% return with a 5% drawdown.
Check the equity curve
A smooth, steadily rising equity curve with controlled drawdowns is better than a jagged curve with sudden spikes. Sudden gains often come from one lucky period and do not repeat.
Look at monthly breakdowns. A strategy that only profits in one or two months may be overfitted to a specific market condition.
From backtest to live
After a promising backtest, run the robot on a demo account for at least two to four weeks. Compare live fills, spread and slippage with the backtest assumptions.
Only then move to live with a small portion of your capital and a conservative risk setting. Increase size only after the live results confirm the backtest story.
FAQ
How long should I backtest a gold EA?
At least 12 months, ideally including different market regimes such as trend, range and high-volatility periods. More data reduces the chance of curve-fitting.
Which modelling quality is needed?
Use 'every tick based on real ticks' in MT5 for the most accurate result. 'Open prices only' can hide slippage and spread issues that hurt live performance.
What metrics matter most?
Profit factor, maximum drawdown, consecutive losses and number of trades. A high return with a deep drawdown is usually worse than a modest return with a smooth equity curve.
Download the MetHaND preset and test it
Use the shipped .set file with your broker's data and compare the results before risking capital.
See pricing