The indicator's principle of operation is described in Bulashev's book Statistics of a Trader or here.
extern int EMA_period=89; // EMA period
extern int price_mode=0; // Priced used 0 - PRICE_CLOSE,
// 1 - PRICE_OPEN,
// 2 - PRICE_HIGH,
// 3 - PRICE_LOW,
// 4 - PRICE_MEDIAN,
// 5 - PRICE_TYPICAL,
// 6 - PRICE_WEIGHTED
extern int mode_ema=0; // Error processing depth, maximum 6
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/8205
The MACD indicator is built on the basis of RSI that, in its turn, is built on MA.ZigZagHistory
Besides already fixed bars, the indicator shows the intermediate static positions of the ZigZag indicator. It will be helpful for those developing systems based on ZigZag.