Skip to content
All library documents

MACD with Discontinued Signal Lines for Momentum Signals

Article ProRealCode

Summary

This note adapts MACD, the difference between fast and slow exponential moving averages, with discontinued signal lines. Rather than comparing the oscillator with one continuously smoothed signal, it updates separate upper and lower lines when the oscillator is positive or negative. When a line is crossed in the opposite direction, its prior value is carried forward as a level. The stated aim is to combine the behavior of smoothed signals and threshold levels.

The example uses periods of 12 and 26 for the moving averages and 9 for signal smoothing. It colors the oscillator green above the upper line and orange below the lower line, presenting these states as bullish and bearish triggers. The document supplies an indicator implementation translated from MT4, but provides no backtest, performance measures, execution rules, or risk controls. Its signal behavior and profitability therefore remain unvalidated in the material presented.

Key ideas

  • MACD is calculated as the difference between fast and slow exponential moving averages.
  • Separate upper and lower signal lines are updated according to whether the oscillator is positive or negative.
  • When the oscillator changes direction across a signal line, the previous line value is retained as a level.
  • The example treats movement above the upper line as bullish and movement below the lower line as bearish.
  • The document describes an indicator but does not provide evidence of trading performance.

Tags

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