Running an Expert Advisor on gold (XAUUSD): what to check first
Gold (XAUUSD) is one of the most traded instruments on MetaTrader 5, and many Expert Advisors are built for it. It also moves faster and in larger steps than most currency pairs, so settings and expectations that suit EURUSD do not carry over. This guide covers what to check before you attach an EA to a gold chart.
Check the contract specification
Brokers define gold contracts differently. A standard lot is commonly 100 troy ounces, but this is not universal. Open the symbol in Market Watch, choose Specification, and read the contract size, minimum lot, lot step, tick size and digits.
The same lot size therefore carries a different dollar risk on gold than on a currency pair. Work out the value of a one-dollar move per lot on your broker before choosing a lot size.
Spreads and commissions matter more on gold
Gold spreads are quoted in points and can widen sharply around news releases and at the daily rollover. Short-term EAs are the most sensitive to this. Compare the typical and the maximum spread, and add any commission to get the true cost of a trade.
Expect larger swings and plan for news
Gold often reacts strongly to US economic data, central bank decisions and geopolitical events. Price can jump through a stop level, which is called slippage, so a stop loss does not guarantee the exit price.
- Check whether the EA has a news filter or a spread filter, and how to set it.
- Consider pausing the EA around major scheduled releases if its manual recommends it.
- Use a lot size you could still tolerate if a stop is filled worse than planned.
Use the right symbol name
Brokers name gold differently, for example XAUUSD, XAUUSDm, GOLD or XAUUSD.pro. Attach the EA to the chart of your broker's gold symbol and check the EA manual to see whether it expects a specific name or a suffix setting.
Test before going live
Backtest in the Strategy Tester using real ticks if your broker provides them, then run the EA on a demo account of the same broker. Past results do not predict future results, and gold conditions change over time, so start live with the smallest lot size.
Frequently asked questions
Can I use a forex EA on gold?
Only if the EA was designed for it. Gold has a different contract size, volatility and spread behaviour, so an EA built for currency pairs needs its own testing and settings on XAUUSD.
Why does my gold EA not trade?
Common causes are the wrong symbol name, Algo Trading disabled, a spread filter blocking entries, or a lot size below the broker's minimum. Check the Experts tab in the Toolbox for the exact message.
Is a stop loss guaranteed on gold?
No. During fast markets the fill can be worse than the stop price because of slippage and wider spreads.
Trading foreign exchange, gold and CFDs carries a high level of risk and may not be suitable for all investors. Past performance, backtests and live results do not guarantee future returns. This guide is general education, not financial advice.