Skip to content
All library documents

Standard-Deviation-Weighted Moving Average Filter

Article ProRealCode

Summary

This indicator combines a simple moving average of typical price with a recursive price filter whose weight is adjusted by the ratio of two close-price standard deviations. The example uses a 50-period moving average and standard-deviation lookbacks of 30 and 9 periods. It scales a smoothing coefficient by the short-to-long volatility ratio, applies the resulting weight to the latest close and prior filter value, then averages that filtered value with the moving average.

The output is colored according to whether it rose or fell relative to the previous bar, providing a directional visual cue. The author presents the construction as a requested modification of a simple moving average, but supplies no chart, market example, parameter rationale, comparison, or backtest. The formula therefore explains an indicator design rather than establishing a profitable signal. Its behavior depends on the chosen periods, and the description does not discuss initialization details, edge cases, or how to use the signal in a complete trading system.

Key ideas

  • The indicator blends a typical-price moving average with a recursively smoothed close-price filter.
  • The filter’s smoothing weight is scaled by the ratio of short- and long-period close-price standard deviations.
  • The displayed value is the average of the moving average and the volatility-adjusted filter.
  • The line color indicates whether the output rose or fell from the prior bar.
  • The document provides no performance test or trading rules for the indicator.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.