Skip to content
All library documents

Coloring Candles by MACD Signal, Zero Line, or Direction

Article MQL5 code base

Summary

This indicator colors price candles according to one of three MACD comparisons: the MACD line against its signal line, its position relative to zero, or its change from the prior value. In each mode, green shades mark bullish candles when the selected condition is positive, while red shades mark bearish candles when it is negative; the opposite candle direction uses lighter shades.

Users can configure the MACD fast and slow EMA periods, signal period, applied price, and comparison mode. The description provides the color rules for each mode, but no performance evidence, entry or exit rules, or guidance on combining the display with other analysis. It therefore explains a chart visualization rather than a complete trading strategy, and the usefulness of its signals is not evaluated.

Key ideas

  • The overlay colors candles based on the relationship between the MACD line and signal line, the zero level, or the prior MACD value.
  • Above-signal or above-zero readings, and rising MACD values, use green shades.
  • Below-signal or below-zero readings, and falling MACD values, use red shades.
  • MACD calculation periods and the applied price are adjustable.

Tags

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