Bollinger Bands %B

bb_percentvolatilityForge API 1

Where the price sits between the Bollinger Bands.

Inputs

NameTypeDefaultRange
sourcesourceclose
periodint201 to 5000
deviationsfloat20 to 10

Outputs

NameTypeRequiredDescription
bb_percentvalueOptionalcolor theme.accent, style line, width 1
Warm-up
period - 1 bars (19 at the defaults)
Repaints
No
Parity
None

Formula

%B = (source - lower) / (upper - lower)

No value when the bands meet.

middle = the simple average of the source over period

upper = middle + deviations * the population standard deviation of the same window, lower = middle - deviations * the same