Modified on 2019/05/09 15:08 by Eugene — Categorized as: TASCIndicators


public static EStdDev Series(DataSeries ds, int period)
public EStdDev(DataSeries ds, int period, string description)

Parameter Description

dsDataSeries used to build ESD
periodLookback period


Standard Deviation is the statistical measure of market volatility. If prices trade in a tight narrow trading range then StdDev will return a low value indicating volatility is low. Conversely if prices swing wildly up and down then StdDev returns a high value indicating volatility is high. What it does is measure how widely prices are dispersed from the average or mean price.

What makes EStdDev (exponential standard deviation) different is the use of exponential smoothing (EMA) vs. simple averaging that takes place inside the indicator. This is believed to make the ESD bands more sensitive to the market action.




/* Normalized */
double C = Close[bar];
if( ( EStdDev.Series( Close, 20 )[bar] / C ) < ( 1.5 / C ) )...


Unlike StdDev, EStdDev uses standard deviation of a population (compatible with Excel STDEVP).

Steps to calculate Extended Standard Deviation for n periods

  1. Calculate the extponential average price for n periods
  2. From each period's price subtract the mean, this gives you the deviation for each period.
  3. Find the sum of the squares of all deviations.
  4. Divide the sum of the squared deviations found in step 3 by ( n - 1 ).
  5. Calculate the square root of the result of the previous step.


Please refer to February 2017 Traders' Tip article's code.