All indicators

Deviation Scaled Moving Average

Jan 4, 2020

Static chart image
SignalsMoving Averages

The Deviation Scaled Moving Average indicator offers an adaptive trend-following solution that adjusts its sensitivity based on price volatility to minimize lag during significant market moves.

Usage

The Usage section describes how the script can be used to identify trend direction and potential reversal points. Because the indicator is designed to adapt to volatility, it remains smooth during sideways markets while reacting quickly to breakouts.

  • Trend Identification: Users can observe the slope and color of the DSMA to determine the current trend. A rising, green line indicates bullish momentum, while a falling, red line indicates bearish momentum.
  • Crossovers: Price crossing above the DSMA can be interpreted as a bullish signal, while price crossing below may suggest a bearish shift.
  • Volatility Adaptation: In high-volatility environments, the indicator speeds up to catch price movements early. In low-volatility environments, it provides a smoother average to avoid false signals.

Details

The Deviation Scaled Moving Average was originally designed by John Ehlers. The implementation utilizes a SuperSmoother filter applied to the price changes to remove unwanted noise.

The core logic involves calculating the standard deviation of this filtered output over a specified length. This value is then used to rescale the filter, creating an adaptive "alpha" or smoothing factor. Unlike a standard Exponential Moving Average (EMA) which uses a fixed smoothing constant, the DSMA's alpha is dynamic. This allows the indicator to rapidly adapt to volatility in price movement while maintaining the smoothing characteristics of a high-order filter.

Settings

  • Length: The lookback period used for the SuperSmoother filter and the standard deviation scaling calculation. Higher values result in a smoother, slower line.
  • Source: The price input used for the calculation (e.g., Close, Open, High, Low).
  • Highlight: A toggle to enable or disable color-coding based on the direction of the moving average.

FAQ

How does the DSMA minimize lag compared to a standard SMA? The DSMA uses an adaptive alpha based on volatility and a SuperSmoother filter, allowing it to react faster to significant price changes while ignoring minor fluctuations.

What is the best timeframe for this indicator? The DSMA is versatile and can be applied to any timeframe, though it is particularly effective for scalping and day trading where minimizing lag is crucial.

How can I access this indicator? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.