Moving average convergence/divergence (MACD) is a technical analysis indicator created by Gerald Appel in 1979. Initially, it was used in commodity and stock trading. The present version of the indicator is a combination of the MACD histogram and the classic indicator which consists of a MACD line and a signal line.
MACD = (ЕМАs(P) - EMAl(P)),
Signal = SМАa(ЕМАs(P) - EMAl(P)), where
ЕМАl(P) is a long-term exponential moving average;
EMAs(P) is a short-term exponential moving average;
SМАa(P) is a short-term simple moving average;
P is a closing price.
The MACD is a classical market oscillator providing clear signals both on a flat market and when the market is following a trend. By comparison with the stochastic oscillator, which is applied during sideways movements only, the MACD is more multifunctional.
The MACD generates signals when the signal line crosses the MACD line.
If the signal line (red line) crosses above the MACD line (blue line), it is a signal to open long positions. Within a clear trend, a trade should be closed if the signal line crosses below the MACD line.
When the signal line (red line) falls below the MACD line (blue line), it is a signal to open short positions. If a trend is evident, the trades should be closed after the reversed crossing of the lines.
The FullMACD provides a clear view of divergence and convergence on the basis of both signal lines and the tops of the histogram bars.
The color of the histogram shows a prevailing trend: the red bar indicates a bearish movement, while the blue bar points out a bullish one. In this regard, the important factor is the change of bar color from blue to red and vice versa. When the histogram crosses the zero line in the FullMACD indicator, it means the mid-term trend has switched to opposite direction.
Fast_MA_Period = 12
Slow_MA_Period = 26
Signal_MA_Period = 9