All Strategies
BreakoutXAUUSD

Donchian Breakout for XAUUSD (Gold)

Buy the highest high of the last N bars — the original turtle-trader strategy.

Indicators

Donchian (50), Donchian (25)

Recommended Timeframes

1h, 4h, 1d

Symbol Volatility

high

Trading Sessions

London, New York (24/5)

Why Donchian Breakout Works on XAUUSD

Donchian breakouts buy when price closes above the N-bar high. It captures regime changes — the moment a market wakes up from a range. Fails in chop (every false breakout is a small loss) but the long tail of trending wins more than compensates. Most profitable on volatile assets like XAUUSD and crypto.

Gold (XAUUSD) is the most-traded commodity pair in retail forex. Strong directional moves during news, high intraday volatility, and clean trending behavior on H1/H4 — a favourite for trend-following and breakout bots.

Commodities like gold and silver have well-defined fundamental drivers — central bank policy, real yields, USD strength. Combined with the technical setup below, this gives the strategy two independent edges.

Best For

  • • Volatile commodities and crypto
  • • Trending indices

Avoid In

  • • Tight ranges
  • • Low-volume sessions

Pine Script Source

Copy this into PineForge — backtest on XAUUSD or any supported symbol, then deploy as a live bot.

donchian-breakout.pinePine Script v5
//@version=5
strategy("Donchian Breakout", overlay=true)

entry_len = input.int(50, "Entry Lookback")
exit_len = input.int(25, "Exit Lookback")

highest_high = ta.highest(high, entry_len)
lowest_low = ta.lowest(low, exit_len)

if close > highest_high[1]
    strategy.entry("Long", strategy.long)

if close < lowest_low[1]
    strategy.close("Long")

Backtest Donchian Breakout on XAUUSD in 30 seconds

Sign up for PineForge, paste this Pine Script, and run a 1-year backtest on real XAUUSD data — no credit card required.

Related Strategies

We use cookies for analytics and ads measurement. See our privacy policy.