Breakout
Squeeze Breakout
Trade the breakout of a Bollinger Band squeeze — entries only when volatility expands.
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.
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)Deploy Squeeze Breakout as a Live Bot
Backtest on real data, then run it 24/7 on your MT5 account.
Get Started Free