stdev
Syntax Format
stdev(series, period)
Overview
The stdev function provides the standard deviation (σ) of the given series over a specified period. This function can be useful in scripts, calculating the range of price fluctuation over a certain timeframe. You can also use this function as a standalone indicator, showing the standard deviation of the series over a certain timeframe.
Parameters
| Parameter | Type | Purpose |
|---|---|---|
| series | series | Input value, taken into calculation |
| period | integer | Input period, taken into calculation |
Returns: series.
Example
sd_value = stdev(close, 14)
Formula
The formula for calculating the stdev function is:
