Bollinger Bands %B
Where the price sits between the Bollinger Bands.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| source | source | close | |
| period | int | 20 | 1 to 5000 |
| deviations | float | 2 | 0 to 10 |
Outputs
| Name | Type | Required | Description |
|---|---|---|---|
| bb_percent | value | Optional | color 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