The Deviation-Scaled Moving Average is a data smoothing technique that acts like an exponential moving average with a dynamic smoothing coefficient. The smoothing coefficient is automatically updated based on the magnitude of price changes. In the Deviation-Scaled Moving Average, the standard deviation from the mean is chosen to be the measure of this magnitude. The resulting indicator provides substantial smoothing of the data even when price changes are small while quickly adapting to these changes.

The smoothing coefficient is calculated using the following algorithm:

  1. A two-bar close price difference is found and run through the SuperSmootherFilter with half the period specified for the Deviation-Scaled Moving Average.
  2. The root mean square of the value derived at Step 1 is calculated.
  3. The ratio of the first value to the second value is found.
  4. The smoothing coefficient will be equal to five times the absolute value of the ratio divided by the specified length.

Input Parameters

Parameter Description
length The period over which the Deviation-Scaled Moving Average will be calculated. The filter will use half this value as its period.




DSMA The Deviation-Scaled Moving Average plot.

Further Reading

1. Technical Analysis of Stocks and Commodities, July 2018.


*For illustrative purposes only. Not a recommendation of a specific security or investment strategy.

  Past performance is no guarantee of future performance.

You may also like
The Momentum Percent Diff is a momentum-based technical indicator. Unlike the regular Momentum ...
thinkScript®: Q&A
What is thinkScript®? thinkScript® is a built-in programming language that gives you the ...
The Slow Relative Strength Index is a version of the classic Relative Strength Index (RSI), ...