Standard deviation
How far values spread around their average over a period.
Inputs
| Name | Type | Default | Range |
|---|---|---|---|
| source | source | close | |
| period | int | 20 | 1 to 5000 |
| method | ma_method | sma |
Outputs
| Name | Type | Required | Description |
|---|---|---|---|
| stdev | value | Optional | color theme.accent, style line, width 1 |
- Warm-up
- period - 1 bars (19 at the defaults)
- Repaints
- No
- Parity
- TA-Lib, within 1e-9
Formula
The square root of the mean squared distance of the last period values from the chosen average at the current bar
The divisor is period, not period - 1.