Moving average convergence/divergence- MACD is one of the most reliable trading indicator used in technical analysis, created by Gerald Appel in the late 1970s. MACD indicator demonstrates the duration of a trend, strength, direction, and momentum of the price changes which helps in foreseeing a perfect entry/exit point for a trade.

MACD indicator (or “oscillator”) shows the relationship between two moving averages (MA) of prices. The MACD is the difference a short period (Fast) exponential moving average (EMA), and a longer period (slow) EMA of the price series. (e.g. EMA(12) and EMA(26) ).

The most commonly used values in MACD are 12, 26, and 9 days, that is, MACD (12,26,9). For example, in the figure above you can see “12, 26, 9” as the MACD parameters which means:

- The 12 represents the previous 12 bars of the faster moving average.
- The 26 represent the previous 26 bars of the slower moving average.
- The 9 represents the previous 9 bars of the difference between the two moving averages.

### The MACD indicator is calculated as follows:

- MACD Line: 12 EMA – 26 EMA of price

Signal Line: 9 EMA of MACD Line

Histogram: MACD Line – Signal Line - Buy and Sell Signals are generated by Crossover of MACD and its signal line.
- Buy Signal – MACD crosses above signal line. If the histogram is above the zero line, then the signal is stronger.
- Sell Signal – MACD crosses below signal line. If the histogram bars are also below the zero line, then the signal is stronger.
- The histogram simply plots the difference between the fast and slow moving average.

**Divergence**

MACD Divergence is one of the most famous and the strongest trading signals that MACD generates. MACD Divergence forms when the price goes up and makes higher highs and at the same time, MACD bars go down and make lower highs.

Divergences should be carried with caution. Bearish divergences are normal in a strong uptrend, while bullish divergences happen frequently in a strong downtrend. A divergence with respect to price may occur on the MACD line and/or the MACD Histogram, however, it is the Price and MACD Histogram Divergence that is the stronger one. Price and MACD Histogram Divergence happens very rarely, but when it does happen it is one of the STRONGEST indications that a bottom or top has reached.

**Convergence**

At the point when price goes down and frames lower highs or lower lows, yet in the meantime MACD bars go up and form higher highs or higher lows. Convergence can be easily seen at the end of downtrends. Both MACD convergence and MACD divergence ought to be nearly looked as they are the most punctual indications of a conceivable change in trend and henceforth give great entry/exit signals.

**How use MACD to detect a trend change**

When a new trend occurs, the fast EMA will respond first and eventually cross the slower EMA. When this “crossover” occurs, and the fast EMA starts to “diverge” or move away from the slower EMA, it often indicates that a new trend has formed.

In the above figure, KWALITY, the EMA 12 crossed above the EMA 26 while the histogram disappeared. This indicates that the trend would eventually be changed. After that from July 1, 2015 KWALITY began shooting up as it started a new uptrend.