A trend-following momentum indicator showing the relationship between two EMAs. It’s calculated as the 12-period EMA minus the 26-period EMA. The resulting MACD line is plotted with a 9-period EMA “signal” line. A common rule: buy when MACD crosses above its signal line, and sell when it crosses below. Robots use MACD crossovers or divergences (MACD vs. price) as trade signals. In MetaTrader use iMACD()
, and in cAlgo use Indicators.MacdHistogram()
or Macd()
.