ta.bbw() - Pine Script Function
ta.bbw()
Section titled “ta.bbw()”Overview
Section titled “Overview”Bollinger Bands Width. The Bollinger Band Width is the difference between the upper and the lower Bollinger Bands divided by the middle band.
Syntax
Section titled “Syntax”ta.bbw(series, length, mult) → series floatParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| series | series int/float | Series of values to process. |
Returns
Section titled “Returns”Bollinger Bands Width.
Remarks
Section titled “Remarks”- na values in the source series are ignored; the function calculates on the length quantity of non-na values.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”//@version=6indicator("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) * 100plot(f_bbw(close, 5, 4))