Adaptive Ehlers Deviation Scaled Moving Average (AEDSMA)
Jan 7, 2022

The Adaptive Ehlers Deviation Scaled Moving Average (AEDSMA) indicator provides a dynamic enhancement to the traditional EDSMA by incorporating volume breakout and volatility metrics to automatically adapt its calculation length. This tool aims to reduce lag during strong trends and minimize false signals during sideways markets by adjusting the smoothing period based on real-time market conditions.
Usage
The Usage section describes how the script can be used to identify market trends and potential entry or exit points. The indicator adapts its length between user-defined minimum and maximum values (defaulting to 50 and 255).
- Trend Identification: The indicator uses a dynamic coloring system to communicate trend strength:
- Strong Uptrend (Lime): Occurs when the trend is supported by both price slope and either volume or volatility.
- Weak Uptrend (Fuchsia): Indicates an upward slope that lacks confirmation from volume/volatility.
- Strong Downtrend (Red): Occurs when the downward trend is supported by volume or volatility.
- Weak Downtrend (Grey): Indicates a downward slope lacking volume/volatility confirmation.
- Consolidation (Yellow): Suggests the market is sideways or choppy based on the slope.
- Signals: The script plots visual cues for trade opportunities:
- Green/Red Circles: Signals potential long or short entries when the trend is supported by the selected dynamic parameters.
- Yellow Crosses: Indicates the price has touched an ATR-based envelope band, often used for setting take-profit or stop-loss levels.
- Envelopes: The included ATR bands act as dynamic support and resistance zones around the main AEDSMA curve.
Details
The AEDSMA is based on John F. Ehlers' Deviation-Scaled Moving Average, which uses a standard deviation-based scaling factor to create a highly responsive filter. This implementation introduces a dynamic length logic:
- Overfitting (Lower Length): When high volume and volatility are detected, the script reduces the length to track price more closely.
- Underfitting (Higher Length): When market activity is low, the script increases the length to filter out noise and avoid fake breakouts.
The tool integrates several volume oscillator options (TFS, OBV, KVO, CVO, VZO) and ATR-based volatility checks to determine the "activity" level of the market. The Super Smoother Filter (SSF) is used within the EDSMA calculation to provide a cleaner output before the scaling factor is applied.
Settings
- Timeframe: Sets the calculation timeframe for the indicator.
- Source Parameters: Allows selection of various price sources (HLCC4, OHLC4, etc.) and the option to use Heikin Ashi candles.
- AEDSMA Envelope: Toggles the ATR-based bands and adjusts their multiplier and period.
- Length Range: Sets the "Minimum Length" and "Maximum Length" that the script oscillates between.
- Adapting Percentage: Determines how aggressively the length changes per bar.
- EDSMA Parameters: Configures the Super Smoother Filter length and poles (2 or 3).
- Adaptation Logic: Toggles whether volume, volatility, or both are used to trigger length changes.
- Signal Filters: Toggles whether slope, volume, or volatility must be present to trigger trend signals and color changes.
- Volume Oscillator Type: Selects the specific volume-based math used for breakouts (e.g., Klinger, VZO).
FAQ
How does the dynamic length improve trading? It allows the indicator to "speed up" during breakouts to capture moves early and "slow down" during choppy periods to prevent being whipped in and out of trades.
Can I use this for scalping and swing trading? Yes, by adjusting the Minimum and Maximum length settings, you can tune the responsiveness to suit different trading styles and timeframes.
How do I access the Adaptive Ehlers Deviation Scaled Moving Average (AEDSMA)? 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.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.