indicator · own pane · open source

Squeeze Momentum

Deepwick · @deepwickv1Updated 2 Oct 2026▲ 0 users
Running…
Loading chart…

About

When Bollinger Bands move inside the Keltner Channel, volatility is compressed — a squeeze. The histogram shows which way momentum is building; grey background marks the squeeze.

A common read: wait for the squeeze to release and trade in the direction of the histogram.

Source code

//@version=5
indicator("Squeeze Momentum", overlay=false)
len = input.int(20, "Length", minval=2)
bbMult = input.float(2.0, "BB mult", step=0.1)
kcMult = input.float(1.5, "KC mult", step=0.1)
[bm, bu, bl] = ta.bb(close, len, bbMult)
[km, ku, kl] = ta.kc(close, len, kcMult)
squeeze = bl > kl and bu < ku
mid = math.avg(math.avg(ta.highest(high, len), ta.lowest(low, len)), ta.sma(close, len))
mom = ta.linreg(close - mid, len, 0)
plot(mom, "Momentum", color=mom >= 0 ? (mom > nz(mom[1]) ? color.teal : color.new(color.teal, 50)) : (mom < nz(mom[1]) ? color.red : color.new(color.red, 50)), style=plot.style_columns)
hline(0, "Zero", color=color.gray)
bgcolor(squeeze ? color.new(color.gray, 85) : na)
alertcondition(squeeze[1] and not squeeze, "Squeeze released", "Volatility squeeze just released")

Comments

No comments yet.

Sign in to comment.