Bollinger %B turns the Bollinger Band setup into a bounded oscillator. 0 means price sits exactly on the lower band, 1 means exactly on the upper, 0.5 means at the middle. Values can fall outside [0, 1] when price punches through the bands.
Formula
%B = (close - lower) / (upper - lower)Params
period- same as Bollinger (default 20).- std dev - same as Bollinger (default 2.0).
Output
Single column named after your indicator (e.g. Bollinger %B).
Usage
- Mean-reversion thresholds:
%B < 0for oversold,%B > 1for overbought. Cleaner than raw price comparisons because the band width is already baked in. - Trend confirmation:
%B > 0.5keeps you on the upper half of the band - a momentum stays-above-middle filter. - Cross zero / cross one as breakout flip signals.
Pitfalls
%B becomes unstable when the bands are very tight (small denominator). Combine with a minimum Bandwidth threshold for robust signals.
