Log in to see Cloud of Tags

Wealth-Lab Wiki

Exponential Deviation

RSS

Syntax

public static ExpDev Series(DataSeries ds, int period, bool useEMA) public ExpDev(DataSeries ds, int period, bool useEMA, string description)

Parameter Description

dsDataSeries used to build ExpDev
periodLookback period
useEMAUses SMA if unchecked, or EMA if checked

Description

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 ExpDev (exponential deviation) different is the use of exponential smoothing (EMA) vs. simple averaging that takes place inside the indicator. This is believed to make the Exponential Deviation bands more sensitive to the market action.

Interpretation

  • Standard deviation rises as prices become more volatile. As price action calms, standard deviation heads lower.
  • Market tops accompanied by increase volatility over short periods of time, indicate nervous and indecisive traders. Or market tops with decreasing volatility over long time frames, indicate maturing bull markets.
  • Market bottoms accompanied by decreased volatility over long periods of time, indicate bored and disinterested traders. Or market bottoms with increasing volatility over relatively sort time periods, indicate panic sell off.

Remarks

  • Avoid testing ExpDev of a Standard Price Series (Bars.Open, Bars.Close, etc.) for an absolute value since these series can be adjusted (split) in the future, which will change their historic deviations. Instead, normalize the test by dividing both StdDev and the value (or series) by the DataSeries value.

Correct

/* Normalized */ double C = Closebar; if( ( ExpDev.Series( C, 20 )bar / C ) < ( 1.5 / C ) )...

Calculation

Initial exponential deviation: Mean deviation (subtract the N-period average of the price from each period's price, take the absolute values of these numbers, sum the absolute values, and divide by the total number of periods (N))

  1. Period deviation (PD) = Absolute value of each period's deviation (close less SMA or EMA)
  2. Multiplier (MLTP) = 2 / (Time periods + 1)
  3. Exponential deviation (ED) = PD * MLTP + ED (previous day) * (1-MLTP)

Example

Please refer to July 2019 Traders' Tip article's code.

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.


ScrewTurn Wiki. Some of the icons created by FamFamFam.