Skip to content
Algo Trade Analytics Docs

ta.bbw() - Pine Script Function

Bollinger Bands Width. The Bollinger Band Width is the difference between the upper and the lower Bollinger Bands divided by the middle band.

ta.bbw(series, length, mult) → series float
NameTypeDescription
seriesseries int/floatSeries of values to process.

Bollinger Bands Width.

  • na values in the source series are ignored; the function calculates on the length quantity of non-na values.
//@version=6
indicator("ta.bbw")
plot(ta.bbw(close, 5, 4), color=color.yellow)// the same on pinef_bbw(src, length, mult) => float basis = ta.sma(src, length)
float dev = mult * ta.stdev(src, length) (((basis + dev) - (basis - dev)) / basis) * 100
plot(f_bbw(close, 5, 4))