indicator · own pane · open source

BB Squeeze indicator

BB Squeeze is a free open-source indicator. BB Squeeze plots Bollinger Bandwidth alongside a Keltner-equivalent width — when BBW falls… Deepwick Script runs a subset of Pine Script.

v1Updated 3 Oct 2026▲ 0 users
Running…
Loading chart…

What BB Squeeze does

BB Squeeze plots Bollinger Bandwidth alongside a Keltner-equivalent width — when BBW falls inside the KC envelope, volatility is compressed.

  • Background highlights the squeeze.
  • Watch for the squeeze to release (BBW crossing back above the KC width) — that's the breakout.

Source code

Deepwick Script, a subset of Pine Script · read-only

//@version=6
indicator("BB Squeeze", overlay=false)
len = input.int(20, "Length", minval=2, maxval=200)
bbMult = input.float(2, "BB multiplier", minval=0.5, maxval=5, step=0.1)
kcMult = input.float(1.5, "KC multiplier", minval=0.5, maxval=5, step=0.1)
colorDown = input.color("color.red", "Color  Down")
colorLine = input.color("color.blue", "Color  Line")
colorNeutral = input.color("color.gray", "Color  Neutral")
bbw = ta.bbw(close, len, bbMult)
[km, ku, kl] = ta.kc(close, len, kcMult)
kcw = (ku - kl) / (ta.sma(close, len) * 0.1)
sqz = bbw < kcw
hline(0, "Zero", color=colorNeutral)
p_BBW = plot(bbw, "BBW", color=colorDown, linewidth=2)
p_KCW = plot(kcw, "KCW", color=colorLine)

Comments

No comments yet.

Sign in to comment.