Exponentially Deviating Moving Average (MZ EDMA)
Mar 2, 2022

The Exponentially Deviating Moving Average (MZ EDMA) indicator provides a specialized moving average designed to predict market exits during top reversals and provide smoothed support and resistance levels.
Usage
The Usage section describes how the script can be used in various market conditions. Users can leverage the EDMA for trend following and identifying potential trend exhaustion.
- Trend Reversals: The EDMA is specifically tuned to deviate from standard exponential moving averages during price peaks. When used in conjunction with the EMA cross strategy, this deviation helps generate quicker exit signals and reduces the frequency of whipsaws.
- Support and Resistance: Due to its unique calculation method, the EDMA creates a smoother curve than traditional EMAs, making it an effective tool for identifying dynamic support and resistance zones.
- Signal Confirmation: The script includes a "Chikou Filter" option. When enabled, trade signals (Buy/Sell) are filtered to ensure they align with the broader trend, potentially increasing signal accuracy.
- EMA Band: Users can visualize an EMA band alongside the EDMA to identify crossovers. A "Strong" signal occurs when the primary EMA (EMA 1) crosses the EDMA, while a "Weak" signal occurs when the secondary EMA (EMA 2) crosses.
Details
The EDMA is constructed through a multi-step process that prioritizes smoothness and responsiveness to trend changes:
- Exponential Expansion: An initial moving line is calculated using EMA logic but with a modified smoothness factor of 1 (standard EMA uses 2).
- Exponential Contraction: A second line is calculated using the first expansion line as the source, again applying a smoothness factor of 1.
- Hull Moving Average Integration: The final output is processed through a Hull Moving Average (HMA) with a length adjusted to 1.5 times the user-defined EDMA length. This combination reduces lag while maintaining a smooth trajectory.
The tool also includes advanced source options, such as Symmetrically Weighted Moving Averages (SWMA) and specialized price calculations (e.g., Heiken-Ashi based sources), to further refine the data input.
Settings
Source Parameters
- Different Sources Options: Selects the mathematical formula used for the price source (e.g., Traditional, Weighted, or Exclusionary high/low logic).
- Tradingview Source Setup: Sets the primary data source (Close, Open, etc.) if traditional sources are selected.
- Apply Symmetrically Weighted Moving Average at the price source: Smooths the initial price input using SWMA; note that this may result in repainting.
MA Parameters
- MA Length: The lookback period for the EDMA calculation.
- Apply Symmetrically Weighted Moving Average at EDMA: Applies SWMA to the final EDMA line.
- EMA 1/2 Length: Sets the length for the two auxiliary EMAs used for crossover signals.
- Show EMA 1/2: Toggles the visibility of the auxiliary EMAs.
- Show Length Info Panel: Toggles an on-chart label displaying current indicator values.
Chikou Filter Parameters
- Chikou Period: Sets the displacement period for the trend filter.
- Bull/Bear/Consolidation Color: Customizes the colors used for dynamic trend visualization.
Trade Parameters
- Show Cross Alerts: Toggles the visibility of "Buy" and "Sell" shapes on the chart.
- Use Chikou Filter for Confirmation: When enabled, signals only appear if they align with the Chikou filter's trend direction.
FAQ
How does the EDMA differ from a standard EMA? The EDMA uses a lower smoothness factor and is wrapped in a Hull Moving Average, allowing it to deviate significantly from standard EMAs during price reversals, often providing earlier exit signals.
What is the difference between a "Strong" and "Weak" signal? A Strong signal is generated when the EMA of the same length as the EDMA crosses it. A Weak signal is generated when a longer-period EMA (default 2x length) crosses the EDMA.
How do I get access to the MZ EDMA? 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.