indicator · own pane · open source

Bollinger Bandwidth indicator

Bollinger Bandwidth is a free open-source indicator. Bollinger Bandwidth is the width of the Bollinger Bands normalised by the middle band. Deepwick Script runs a subset of Pine Script.

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

What Bollinger Bandwidth does

Bollinger Bandwidth is the width of the Bollinger Bands normalised by the middle band. The cleanest volatility indicator for squeeze detection.

  • Lowest 1% of readings = squeeze setups.
  • A re-expansion after a squeeze is the canonical breakout entry.
  • Pair with %B for direction-of-break confirmation.

Source code

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

//@version=6
indicator("Bollinger Bandwidth", overlay=false)
len = input.int(20, "Length", minval=2, maxval=200)
mult = input.float(2, "Mult", minval=0.5, maxval=5, step=0.1)
src = input.source(close, "Source")
colorMid = input.color("color.orange", "Color  Mid")
colorNeutral = input.color("color.gray", "Color  Neutral")
bw = ta.bbw(src, len, mult)
hline(0, "Zero", color=colorNeutral, linestyle=hline.style_dotted)
p_Bandwidth = plot(bw, "Bandwidth", color=colorMid, linewidth=2)
alertcondition(bw < ta.lowest(bw, 100)[1], "Squeeze low", "Bandwidth at a 100-bar low")
alertcondition(ta.crossover(bw, ta.lowest(bw, 100)[1]), "Squeeze release", "Bandwidth expanding from a squeeze")

Comments

No comments yet.

Sign in to comment.