All Strategies
BreakoutXAUUSD

Squeeze Breakout for XAUUSD (Gold)

Trade the breakout of a Bollinger Band squeeze — entries only when volatility expands.

Indicators

Bollinger Bands, Keltner Channel

Recommended Timeframes

1h, 4h

Symbol Volatility

high

Trading Sessions

London, New York (24/5)

Why Squeeze Breakout Works on XAUUSD

A "squeeze" happens when Bollinger Bands contract inside the Keltner Channel — volatility is unusually low. The strategy waits for the squeeze to release, then trades in the direction of the expansion. Filters out chop, captures the start of new trends. Works best on volatile symbols where squeezes are rare and consequential.

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

  • • Volatility expansion regimes
  • • Pre-news setups

Avoid In

  • • Constant-volatility crypto
  • • Illiquid sessions

Pine Script Source

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

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

length = input.int(20, "Length")
bb_mult = input.float(2.0, "BB Multiplier")
kc_mult = input.float(1.5, "KC Multiplier")

basis = ta.sma(close, length)
dev = ta.stdev(close, length)
bb_upper = basis + dev * bb_mult
bb_lower = basis - dev * bb_mult
atr = ta.atr(length)
kc_upper = basis + atr * kc_mult
kc_lower = basis - atr * kc_mult

squeeze = bb_upper < kc_upper and bb_lower > kc_lower
release = not squeeze and squeeze[1]

if release and close > basis
    strategy.entry("Long", strategy.long)

if release and close < basis
    strategy.entry("Short", strategy.short)

Backtest Squeeze 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.