Skip to content
All library documents

Building MACD Candles from Open, High, Low, and Close Values

Article MQL5 code base

Summary

This indicator represents MACD as candles rather than displaying price bars and a separate signal line. It calculates four MACD values from the open, close, high, and low price series, then combines those values into a candle format. Candle color, which conveys the indicated trend, is determined by the open-based and close-based MACD values rather than by the slope of a single line.

The description also departs from the conventional MACD definition by allowing four moving-average types: exponential, simple, smoothed, and linearly weighted. The selected average type is applied with the same fast and slow periods. This makes the indicator configurable, but the document offers no performance tests, trading rules, or evidence that its colors predict returns. It describes a visualization method, not a validated standalone strategy.

Key ideas

  • The indicator forms candles from MACD values calculated on open, close, high, and low prices.
  • Candle color is based on the open and close MACD values.
  • The calculation can use exponential, simple, smoothed, or linearly weighted averages.
  • The description provides no testing evidence or trading rules for interpreting the candles.

Tags

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