Trading gold (XAUUSD) with a bot
Why gold behaves differently from currency pairs, how spreads, sessions, news and contract sizes affect a gold trading bot, and the settings that matter most.
Gold is one of the most popular instruments for trading bots, and for good reason: it trends strongly and moves a lot. The same qualities make it dangerous. A bot that works on EURUSD can fail on gold simply because it doesn’t respect how differently gold moves.
How gold is different
- Bigger moves. Gold’s daily range in dollars is large, and the price can move several dollars in a minute around news. Stops that look generous on a chart can be hit by ordinary noise.
- Wider and less stable spreads. Gold spreads widen sharply during low-liquidity hours, especially around the daily rollover at the end of the New York session, and around major news.
- Strong reaction to US data. Payrolls, inflation (CPI), Fed decisions and Fed speeches move gold hard, often in both directions within minutes.
- Different contract sizes. At many brokers 1 lot is 100 ounces, so a $1 move is $100 per lot. Some brokers use other sizes, and symbol names vary (XAUUSD, XAUUSD.m, GOLD). Always check the contract specification.
Settings that matter most for a gold bot
Volatility-based stops. Use stops based on ATR rather than a fixed number of dollars, so the stop widens when the market is wild and tightens when it is calm.
Position size from the stop, not a fixed lot. Because gold stops are wide, a fixed 0.10 lot can risk far more than you think. Calculate the size from the stop distance. Our position sizing guide has a worked gold example. If even the broker’s minimum lot would risk more than your limit, skip the trade.
A spread filter. Refuse entries when the spread is unusually wide compared with normal volatility. This alone avoids many bad fills at rollover and during news.
A news filter. Pause new entries shortly before and after high-impact US releases. You give up a few opportunities and avoid the most random moves.
Session rules. Avoid opening trades in the hours around the daily rollover, when spreads are worst.
Weekend handling. Gold can gap on Monday’s open after weekend news. Either close before the weekend or accept and size for gap risk.
Trend strategies on gold
Gold has historically spent long periods in strong trends, which suits trend-following methods such as Donchian channel breakouts. Two warnings apply: trend systems lose many small trades in sideways markets, and the profits come from a minority of large trades. Profit protection must not cut those large trades too early; see how to lock in profits.
Common gold bot red flags
- Grid or martingale systems on gold. Gold’s large one-way moves are exactly what destroys them.
- “Scalping” bots whose results depend on ultra-low spreads that your broker doesn’t offer.
- Backtests without real, variable spreads.
- Results that show only a few weeks in one market phase.
How gicleur handles gold
gicleur trades XAUUSD with the same one-hour trend strategy as its forex pairs, with an ATR-based stop. Gold is traded only when the stop fits inside your maximum risk per trade; otherwise the signal is skipped. The bot skips entries when the spread is wider than 15% of the ATR, avoids the rollover hours, stays out 30 minutes before and 15 minutes after major news, does not open new trades late on Friday and closes before the weekend. It also finds your broker’s gold symbol on its own.
The short version
Gold rewards patience and punishes oversized positions. Size every trade from an ATR-based stop, filter spreads and news, and judge a gold bot over many months, not a lucky week.