The On screen MACD indicator is drawn on the main price chart. Slow ЕМА is used as the zero line.
It has four adjustable parameters:
Calculations:
MACD = EMA(Applied price, Fast EMA period)
Zero = EMA(Applied price, Slow EMA period)
Signal = Zero + SMA(RAW, Signal period)
Histogram = Zero + MACD - Signal
where:
RAW = MACD - Zero


MetaQuotes Ltd tarafından Rusçadan çevrilmiştir.
Orijinal kod: https://www.mql5.com/ru/code/23005