Skip to content
All library documents

Zero-Lag MACD Divergence Signals from Price Extremes

Article ProRealCode

Summary

This indicator seeks bullish and bearish divergences between price swings and a zero-lag MACD. It builds the MACD and its signal line from double-smoothed exponential averages, then tracks price highs or lows and corresponding MACD extremes around signal-line crossovers. A bearish signal requires a higher price peak alongside a lower MACD peak; a bullish signal requires a lower price trough alongside a higher MACD trough, with a crossover and directional confirmation in each case.

The document provides implementation logic and says the method is adapted from an RSI divergence indicator. It can be used in automated strategies, but it reports no backtest, performance measures, or trading rules for entries, exits, and risk. The author cautions that its outputs may differ from the platform’s built-in MACD divergence tool. As with divergence methods generally, signals can be sensitive to swing identification and should not be treated as evidence of profitability.

Key ideas

  • The indicator calculates a zero-lag MACD and a smoothed signal line from exponential averages.
  • It records price and MACD extremes around signal-line crossovers to identify divergence.
  • Bearish divergence pairs a higher price high with a lower MACD extreme.
  • Bullish divergence pairs a lower price low with a higher MACD extreme.
  • The document gives no performance evidence and warns that results may differ from the platform's built-in indicator.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.