Skip to main content

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

ParameterTypePurpose
seriesseriesInput value, taken into calculation
periodintegerInput period, taken into calculation

Returns: series.

Example

sd_value = stdev(close, 14)

Formula

The formula for calculating the stdev function is:

image.png