Hybrid, Zero lag, Adaptive cycle MACD
Jun 9, 2022

The Hybrid, Zero lag, Adaptive cycle MACD indicator is a comprehensive momentum tool that combines traditional oscillator mechanics with John Ehlers' bandpass filter techniques to measure and adapt to the dominant price cycle. By dynamically adjusting its calculation periods based on market frequency, it aims to reduce lag and provide more accurate signals in both trending and cycling market conditions.
Usage
The indicator can be used similarly to a standard MACD but with significantly enhanced flexibility. Users can toggle between "Regular" and "Zero Lag" modes to change the underlying responsiveness of the oscillator.
The core feature is the Calculation Type. When set to "Band-pass", the indicator ignores fixed length inputs and instead uses a measured dominant cycle period. This allows the MACD and Signal lines to stretch or compress based on current market volatility and periodicity. For example, if the dominant cycle is measured at 20 bars, the MACD components will scale accordingly to filter out noise while capturing the primary swing.
Details
This tool is based on concepts from John Ehlers' article "Measuring Cycle Periods." It uses a bandpass filter to isolate the dominant cycle by filtering out low-frequency trends and high-frequency noise.
The script offers 10 different Moving Average types for both the Oscillator and the Signal line, including ALMA, DEMA, LSMA, and TEMA. In Zero Lag mode, the indicator applies a specific mathematical offset to the moving averages to compensate for the inherent delay found in standard calculations.
Settings
MACD
- MACD Type: Choose between "Zero lag" or "Regular" calculation methods.
- Calculation Type: Switch between "Fixed" (traditional) and "Band-pass Dominant Cycle" (adaptive).
- Source: The price data used for calculations (default is Close).
- Fast/Slow/Signal Length: Manual period settings used when Calculation Type is set to "Fixed".
- Oscillator/Signal Line MA Type: Selection of 10 different moving average algorithms for the calculation.
Band-pass
- Band-pass Period/Width: Controls the sensitivity and focus of the cycle measurement filter.
- MACD Percent of Dominant Cycle (%): Adjusts the fast length as a percentage of the detected cycle.
- Signal Percent of Dominant Cycle (%): Adjusts the signal line length relative to the cycle.
- MACD Slow-to-Fast Multiple: Defines the ratio between the slow and fast lengths in adaptive mode.
Moving Average Inputs
- ALMA Offset/Sigma: Specific parameters for the Arnaud Legoux Moving Average.
- LSMA Offset: Specific parameter for the Least Squares Moving Average.
FAQ
How do I access Hybrid, Zero lag, Adaptive cycle MACD?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
What is the advantage of using the Band-pass calculation?
The Band-pass mode allows the indicator to "speed up" during high-frequency cycles and "slow down" during longer-term moves, theoretically keeping the signals in sync with the current market rhythm.
What does the "Zero Lag" option do?
The Zero Lag option uses a double-calculation technique to subtract the lag inherent in moving averages, making the MACD line much more responsive to price pivots.
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.