Adaptive, Jurik-Filtered, JMA/DWMA MACD
Jun 17, 2022

The Adaptive, Jurik-Filtered, JMA/DWMA MACD indicator is a specialized momentum oscillator that replaces traditional exponential moving averages with adaptive Jurik-filtered and Double Weighted Moving Average (DWMA) components to reduce lag and noise. This tool provides a cleaner signal for identifying trend reversals and momentum shifts compared to the standard MACD approach.
Usage
The indicator can be used similarly to a traditional MACD but with significantly reduced signal delay. Traders can identify bullish momentum when the histogram is green and rising, and bearish momentum when it is red and falling. The inclusion of an adaptive mode allows the indicator to adjust its look-back periods automatically based on market cycles.
Main usage scenarios include:
- Zero-Line Crosses: Identifying broad shifts in trend direction.
- Momentum Changes: Monitoring the color-coded histogram for early signs of weakening or strengthening trends.
- Adaptive Filtering: Using the Autocorrelation Periodogram mode to let the indicator tune itself to current market volatility and cycles.
Details
This script utilizes two distinct filtering techniques to create the MACD line:
- Jurik Filter (JMA): Used for the fast line. It is highly responsive to price reversals while maintaining smoothness and eliminating overshoot. It includes "Jurik Volty," a volatility-based adaptation mechanism.
- Double Weighted Moving Average (DWMA): Used for the slow line. This component tends to delay its reaction until the JMA confirms a move, providing a stable baseline for comparison.
The "Adaptive" feature is powered by John F. Ehlers’ Autocorrelation Periodogram Algorithm, which measures the dominant cycle of the market. Instead of using fixed lengths, the script can dynamically adjust the JMA and DWMA periods to match the measured market cycle, helping to remove spectral dilation and lag.
Settings
Basic Settings
- Calculation type: Choose between "Fixed" lengths or "Autocorrelation Adaptive" mode.
- Source: The price data used for calculations (default is Close).
- JMA Length: The look-back period for the Jurik Filter (used in Fixed mode).
- DWMA Length: The look-back period for the Double Weighted Moving Average (used in Fixed mode).
- Jurik Phase: Adjusts the balance between smoothness and lag for the JMA component.
JMA/DWMA Autocorrelation Periodogram Algorithm
- APA Source: The price source for cycle measurement.
- APA Min/Max Length: Defines the boundaries for the dominant cycle detection.
- APA Average Length: The look-back used for the autocorrelation calculation.
UI Options
- Color bars?: Toggles price bar coloring based on the MACD momentum state.
FAQ
How do I interpret the histogram colors?
The histogram uses four colors: bright green for rising positive momentum, dark green for falling positive momentum, bright red for falling negative momentum, and dark red for rising negative momentum.
What is the advantage of using JMA over EMA?
JMA (Jurik Moving Average) is designed to be virtually lag-free and extremely smooth, whereas EMAs often suffer from significant delay and "overshoot" during volatile price gaps.
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.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.