Skip to content
All library documents

Detecting MACD Slope Divergence with a Regression Channel

Article MQL5 code base

Summary

This indicator looks for divergence by applying a linear regression channel to the MACD. It draws a middle channel line whose color changes to signal a change in slope; users can treat that change as a divergence cue and respond according to their usual trading rules. The method builds on a separate RSI slope divergence concept, adapting the slope check to MACD, which the document says tends to track price changes more closely than some other indicators.

The suggested default regression period is 100, with experimentation encouraged because longer periods are said to produce usable results. The document gives no performance data, signal definitions beyond the color change, or rules for entries, exits, and risk. A color change is therefore an indicator event rather than evidence of a profitable trade, and the settings may need evaluation for the instrument and timeframe in use.

Key ideas

  • The indicator applies a linear regression channel to MACD to assess slope divergence.
  • A color change in the channel’s middle line is presented as a divergence cue.
  • The suggested default regression period is 100, but the document advises experimenting with settings.
  • The document provides no backtest evidence or specific entry, exit, or risk rules.

Tags

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