Bollinger Bands width

bbwvolatilityForge API 1

The distance between the Bollinger Bands relative to the middle line.

Inputs

NameTypeDefaultRange
sourcesourceclose
periodint201 to 5000
deviationsfloat20 to 10

Outputs

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

Formula

width = (upper - lower) / middle

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