Indicators: MACD

 

MACD:

The Moving Average Convergence/Divergence (MACD) is the next trend-following dynamic indicator. It indicates the correlation between two Moving Averages of a price.

MACD indicator

Author: MetaQuotes Software Corp.

 

Could you please tell me why your MACD indicator edition uses the simple smoothing method when calculating the signal line?

According to other sources(example 1, example 2) the signal line is smoothed exponentially.

You have: SIGNAL = SMA(MACD, 9), alternative sources: SIGNAL = EMA(MACD, 9)

 
Since in this code both Fast and Slow are calculated by EMA, the line //--- get SlowSMA buffer should contain //--- get Slow EMA buffer, and Print("Getting slow SMA is failed! Error",GetLastError()); should also contain EMA instead of SMA.