indicator · own pane · open source

TTM Squeeze

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

About

TTM Squeeze highlights when Bollinger Bands squeeze inside Keltner Channels (vol compression — grey background). The histogram then shows which way momentum is releasing.

  • Squeeze fires while bands are inside channels; trade the histogram direction once it releases.
  • Positive green bars = bullish momentum building, red = bearish.
  • Combine with a higher-timeframe trend filter for cleanest signals.

Source code

//@version=5
indicator("TTM Squeeze", overlay=false)
len = input.int(20, "Length", minval=2)
[bm, bu, bl] = ta.bb(close, len, 2)
[km, ku, kl] = ta.kc(close, len, 1.5)
sqz = 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)
bgcolor(sqz ? color.new(color.gray, 85) : na)
hline(0, "Zero", color=color.gray, linestyle=hline.style_dashed)
p_Momentum = plot(mom, "Momentum", color=mom >= 0 ? color.green : color.red, style=plot.style_columns)
alertcondition(sqz[1] and not sqz, "Squeeze released", "Bollinger Bands exited Keltner Channel")
alertcondition(ta.crossover(mom, 0), "Momentum turns up", "TTM squeeze momentum crossed above zero")

Comments

No comments yet.

Sign in to comment.