StdDev (Function)

image\trumpet2.gif Disclaimer

The StdDev function calculates a standard deviation of a population of values.

Syntax

StdDev(Price, Length)

Returns (Double)

A numeric value containing the current standard deviation.

Parameters

Name

Type

Description

Price

Numeric

Specifies which bar value (price, function, or formula) to be considered.

Length

Numeric

Sets the number of bars to be considered.

Remarks

To find the standard deviation, first find the variance and then take its square root:

StdDev = image\standarddev_formula.gif

…where

N is the number of elements

D is the individual elements in the sample

M is the sample mean

Example

Assigns to Value1 the standard deviation of Close over 10 bars.

Value1 = StdDev(Close, 10);