Modern Adaptive MACD
Jun 2, 2026

The Modern Adaptive MACD indicator provides a modernized rebuild of the classic Moving Average Convergence Divergence oscillator by incorporating real-time cycle adaptation, signal speed optimization, and multi-market normalization.
Usage
The Usage section describes how the script can be used to improve market timing and momentum analysis. By default, the indicator acts as a standard MACD, but its features can be layered to enhance responsiveness. It is designed to be used as a timing tool in conjunction with trend filters, market structure, or key levels rather than a standalone system.
Adaptive Cycles
When Layer 1 is enabled, the indicator replaces fixed lengths with an Ehlers homodyne discriminator. This allows the MACD to widen during slow trends to prevent whipsaws and tighten during high volatility to stay responsive to price shifts.
Signal Speed Adjustment
Layer 2 allows users to reduce the inherent lag of the signal line smoothing. By adjusting the signal multiplier below 1.0, traders can achieve earlier swing confirmations. Users should note that while a lower multiplier (e.g., 0.5) can catch moves several bars earlier, it may increase the frequency of false signals.
Normalization
Layer 3 provides two methods to make MACD readings comparable across different assets. "Percent of price" expresses the value relative to the current price, while "Z-Score" calculates standard deviations from a recent average, allowing for consistent threshold analysis on any symbol.
Details
The script implements several advanced concepts to modernize the traditional oscillator:
- Dominant Cycle Measurement: Uses an Ehlers homodyne discriminator to track the market's current frequency, ensuring the EMA lengths are always relevant to the current timeframe and volatility.
- Non-Repainting Divergences: Detects regular and hidden divergences using confirmed pivots. While this introduces a small lag (defined by the pivot right bars setting), it ensures that signals do not disappear once they appear on the chart.
- Principled Lag Reduction: Instead of using DSP-based zero-lag transforms which can cause overshooting and histogram inversion, this script uses a parameter-based multiplier for the signal line to maintain the structural integrity of the MACD cross.
Settings
- Source: The price series used for calculations (default is Close).
- Classic Periods (Fast/Slow/Signal): Standard lengths used only when the Adaptive feature is disabled.
- Cycle-tune periods (Adaptive): Enables real-time period adjustment based on market cycles.
- Min/Max Dominant Cycle: Sets the boundaries for the adaptive cycle measurement.
- Fast/Signal Ratio: Determines the relationship between the adaptive slow period and the fast/signal lines.
- Signal Length Multiplier: Adjusts the responsiveness of the signal line (1.0 is standard; lower values are faster).
- Normalization Mode: Choose between None, Percent of Price, or Z-Score.
- Z-Score Lookback: The period used to calculate the mean and standard deviation for normalization.
- Show Divergences: Toggles the visibility of divergence lines and labels.
- Pivot Left/Right Bars: Determines how many bars are required to confirm a swing high or low.
- Regular/Hidden Divergences: Selects which divergence types are plotted on the chart.
- Show Cross Markers: Toggles small triangle markers at every MACD/Signal crossing point.
FAQ
How do I interpret the adaptive periods? The indicator automatically stretches or shrinks the EMA lengths based on the detected market cycle. In choppy markets, the lengths will expand to filter noise, while in trending markets, they contract to follow price action closely.
Why do divergences appear a few bars late? The script uses confirmed pivots to prevent repainting. The "Pivot Right Bars" setting determines this delay; a setting of 5 means a divergence is confirmed 5 bars after the actual peak or trough occurs.
How can I access the Modern Adaptive MACD? 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.