Bollinger %B

Where price sits between the Bollinger Bands: 0 at the lower band, 1 at the upper.

Bollinger %B as a 0–1 RATIO (not a percent): (x − lower) ÷ (upper − lower) of the Bollinger bands with the same period and mult. 0 = on the lower band, 0.5 = on the middle, 1 = on the upper band; it goes below 0 or above 1 outside the bands. Not ready while the bands are flat (upper = lower). Mirror: around 0.5.

Settings

SettingDefaultRangeWhat it does
period201 to 500Candles in the average and the deviation.
mult20.1 to 10Band distance in standard deviations.

What it gives

OutputWhat it is
bbpPosition inside the bands, 0–1.

What it reads

It reads open, high, low, close, hl2, hlc3, ohlc4, hlcc4, close by default.

Warm-up

With its default settings, Bollinger %B needs 20 closed candles before its first value. A backtest loads them before its start date, so the first trade can already use it.

Related indicators

Built from: Bollinger Bands

Test it

Copy this sentence into the Algonney chat to backtest it:

Backtest a strategy on BTC that uses Bollinger %B with its default settings