Gold (XAUUSD) is one of the most popular instruments for automated trading — and for good reason. It trends well, has predictable session patterns, and offers enough volatility for both scalping and swing strategies. But automating gold trading comes with unique challenges that differ from forex pairs.

This guide covers everything you need to know about running automated XAUUSD strategies through a TradingView-to-MT5 signal bridge.

Why Automate Gold Trading?

Gold moves fast. A 200-pip move in a single London session isn't unusual, and news events can trigger 500+ pip swings in minutes. For manual traders, this means:

Automation removes all of these emotional factors. Your TradingView strategy defines the rules, and the MT5 EA executes them consistently — whether it's a calm Asian session or a volatile NFP release.

Gold-Specific Considerations

Symbol Mapping

Gold's symbol name varies wildly between brokers:

Broker Symbol Name
IC Markets XAUUSD
Exness XAUUSDm
FTMO XAUUSD.a
Pepperstone XAUUSD
FBS XAUUSDc
RoboForex XAUUSD

A good EA handles this automatically through broker-agnostic symbol mapping. When you send "symbol": "XAUUSD" in your alert, the EA finds the matching symbol on your broker regardless of suffixes or prefixes.

Point Values and Lot Sizing

Gold is priced differently from forex pairs:

When setting stop losses, remember that gold's daily range is typically 200-400 pips. A 50-pip SL that makes sense on EURUSD would be extremely tight on gold and likely get stopped out by noise.

Recommended SL ranges for gold: - Scalping: 50-100 pips - Day trading: 100-200 pips - Swing trading: 200-500 pips

Session-Based Trading

Gold has distinct behavioral patterns across trading sessions:

Asian Session (00:00-08:00 GMT) - Low volatility, ranging behavior - Consolidation after the previous day's move - Good for range-bound strategies, poor for trend-following

London Session (08:00-16:00 GMT) - Highest volume and volatility - Major trend moves start here - Best session for breakout and trend strategies

New York Session (13:00-21:00 GMT) - Overlap with London (13:00-16:00) is the most active period - US economic data releases cause sharp moves - Good for momentum strategies

You can configure trading schedule filters in your EA to only execute signals during specific sessions. For example, only trade gold during London and New York overlap:

{
  "action": "alertS",
  "symbol": "XAUUSD",
  "magic": 7001,
  "start_time": "08:00",
  "end_time": "20:00",
  "size": 0.1,
  "sl": 150,
  "tp": 300
}

Gold Trading Strategy Examples

Breakout Strategy

A simple London session breakout on gold:

  1. Define the Asian session range (00:00-07:00 GMT high/low)
  2. Set alerts for price breaking above the high or below the low after 08:00
  3. Execute with a 100-pip SL and 200-pip TP
  4. Add trailing stop that activates at 100 pips profit

TradingView alert for the long breakout:

{
  "action": "alertX",
  "symbol": "XAUUSD",
  "magic": 7001,
  "direction": "BUY",
  "size": 0.05,
  "sl": 100,
  "tp": 200,
  "trail_activate": 100,
  "trail_distance": 50
}

Moving Average Crossover

Use a 20 EMA / 50 EMA crossover on the 1H chart:

This works well in Pine Script mode — let the strategy handle entries and exits directly.

Multi-Timeframe Confirmation

Use the two-step alert system for higher-confidence entries:

  1. 4H chart — When trend direction aligns (e.g., price above 200 SMA), send alertX
  2. 15M chart — When pullback entry triggers (e.g., RSI oversold in uptrend), send alertY

The trade only executes when both conditions are met. This reduces false signals significantly.

Risk Management for Gold

Gold's volatility means risk management isn't optional — it's survival:

Position Sizing

With gold's larger pip values, use smaller lot sizes than you would for forex pairs. A 200-pip stop loss on gold at 0.1 lots = $200 risk. Make sure this fits your account's risk tolerance (typically 1-2% per trade).

Partial Take Profit

Gold tends to make large moves with significant pullbacks. Partial TP locks in profits while keeping exposure to the trend:

{
  "action": "alertX",
  "symbol": "XAUUSD",
  "magic": 7001,
  "direction": "BUY",
  "size": 0.1,
  "sl": 150,
  "partial_tp": "0.03=100,0.03=200,0.03=300",
  "trail_activate": 150,
  "trail_distance": 75
}

This closes 0.03 lots at 100, 200, and 300 pips, then trails the remaining 0.01 lots.

Breakeven Protection

Move your stop loss to entry after a configurable profit level. For gold, setting breakeven at 50-80 pips is common — enough room for the position to breathe but protecting your capital early.

News Event Handling

Gold reacts violently to: - US Non-Farm Payrolls (NFP) — First Friday of each month - FOMC rate decisions — 8 times per year - CPI data — Monthly - Geopolitical events — Unpredictable

Consider pausing your automated strategy 15 minutes before and after major news releases. You can set excluded time periods in your trading schedule, or use alertS with "start": "STOP" to pause and "start": "START" to resume.

FAQ

What's the best timeframe for automated gold trading? It depends on your strategy. Scalping strategies work best on 5M-15M charts. Day trading on 15M-1H. Swing trading on 4H-Daily. The signal bridge executes at the same speed regardless of timeframe.

How much capital do I need to trade gold automatically? With 0.01 lot (micro) and a 200-pip stop loss, your risk per trade is about $20. A $1,000 account with 2% risk per trade allows 0.01 lot with 200-pip SL. Scale up from there.

Can I trade gold on a prop firm (FTMO, FundedNext)? Yes. Most prop firms allow EAs on MT5. Make sure your EA's symbol mapping handles the prop firm's gold symbol name, and stay within the firm's daily drawdown limits.


Automate your gold trading with iNakaTrader. TradingView alerts to MT5 execution with trailing stop, breakeven, and 4-level partial TP. View plans.

Risk Disclaimer: Trading forex and other financial instruments involves substantial risk of loss and is not suitable for all investors. Past performance does not guarantee future results. Only trade with capital you can afford to lose. iNakaTrader provides signal execution tools, not financial advice.