**Introduction to MACD**

Moving Average Convergence Divergence (MACD) is a trend-following momentum indicator that shows the relationship between two moving averages of a stock’s price. MACD helps investors understand whether the bullish or bearish movement in the price is strengthening or weakening. Created by Gerald Appel, it is designed to reveal changes in the strength, direction, momentum, and duration of a trend in a stock’s price.

**The following are the topics of all the articles we will cover in our MasterClass on MACD:**

**Part 1**: Introduction to MACD**Part 2**: Centreline Crossover Strategy**Part 3**: Signal Line Crossover Strategy**Part 4**: MACD Histogram in Multiple Time-Frames**Part 5**: MACD with Stochastic Indicator

In the **Part – 1 **of our MasterClass on MACD, we’ll be giving an in-depth introduction to what MACD is and how to use it. We’ll be discussing the following topics in-depth with descriptions on the chart wherever necessary:

- Trend-Following Momentum Oscillator
- Exponential Moving Average
- MACD Line
- Convergence-Divergence Meaning
- Signal Line
- Histogram
- Use Cases

**Calculation**

The MACD indicator as a whole consists of the MACD Line, the Signal Line and the MACD Histogram each with their own interpretations and uses. The following are the features and calculations of the MACD indicator:

**EMA**– An exponential moving average (EMA) is a type of moving average (MA) that places a greater weight and significance on the most recent data points. An exponentially weighted moving average reacts more significantly to recent price changes than a simple moving average (SMA), which applies an equal weight to all observations in the period.

**MACD Line**– MACD is calculated simply by subtracting the long-term EMA (26 periods) from the short-term EMA (12 periods).

`MACD=12-Period EMA − 26-Period EMA`

**Signal Line**– A nine-day EMA of the MACD called the “**signal line**,” is then plotted on top of the MACD line, which can function as a trigger for buy and sell signals.

`Signal Line = 9-Period EMA of MACD Line`

**Histogram**– MACD is often displayed with a histogram (see the chart below) which graphs the distance between the MACD and its signal line. If the MACD is above the signal line, the histogram will be above the MACD’s baseline. If the MACD is below its signal line, the histogram will be below the MACD’s baseline. Traders use the MACD’s histogram to identify when bullish or bearish momentum is high.

**Idea**

The MACD turns two trend-following indicators (exponential moving averages) into a momentum oscillator by subtracting the longer moving average from the shorter one. By default, it is calculated by subtracting the 26-period Exponential Moving Average (EMA) from the 12-period EMA. As a result, the MACD offers the best of both worlds: trend following and momentum.

The MACD fluctuates above and below the zero line as the moving averages converge, cross and diverge. Traders can look for signal line crossovers, centerline crossovers and divergences to generate signals.

**Parameters**

There are 3 parameters associated with MACD. The look-back periods of shorter and longer EMA to define the MACD Line form the first two parameters of MACD. The third parameter is the look-back period of the EMA associated with the Signal Line. By default, a setting of (12, 26, 9) is used which means MACD Line is calculated as the difference of 12-EMA and 26-EMA whereas Signal Line is calculated by taking 9-EMA of the MACD Line.

**Convergence-Divergence**

As the name implies, the MACD is all about the convergence and divergence of the two moving averages. **Convergence **occurs when the moving averages move towards each other. **Divergence **occurs when the moving averages move away from each other.

The shorter moving average (12-EMA) is faster and more reactive to recent price changes. The longer moving average (26-EMA) is slower and less reactive to price changes in the underlying security. This means that when the 12-EMA is greater than the 26-EMA, recent prices are rising and there’s a **positive sentiment **in the market. On the other hand, when the 12-EMA is smaller than 26-EMA it means that the recent prices are falling and there’s a **negative sentiment **in the market.

A positive MACD indicator indicates that the 12-day EMA is above the 26-day EMA. Positive values increase as the 12-EMA diverges further from the 26-EMA. This means the upside momentum is increasing. Negative MACD values indicate that the 12-day EMA is below the 26-day EMA. Negative values increase as the 12-EMA diverges further below the 26-EMA. This means downside momentum is increasing.

**Use Cases**

**Centreline Crossover**: The MACD line oscillates above and below the zero line, which is also known as the**centreline**. These crossovers signal that the 12-day EMA has crossed the 26-day EMA. The direction, of course, depends on the direction of the moving average cross.

A bullish centerline crossover occurs when the MACD line moves above the zero line to turn positive i.e. 12-EMA crosses up 26-EMA. A bearish centerline crossover occurs when the MACD moves below the zero line to turn negative.

**Signal Line Crossover**: The signal line is a 9-day EMA of the MACD line which trails the MACD and indicates the momentum changes in convergence-divergence. A bullish crossover occurs when the MACD turns up and crosses above the signal line. A bearish crossover occurs when the MACD turns down and crosses below the signal line.

**MACD Divergence**: A bullish divergence forms when a security records a lower low and the MACD forms a higher low. The lower low in the security affirms the current downtrend, but the higher low in the MACD shows less downside momentum. A bearish divergence forms when a security records a higher high and the MACD line forms a lower high. The higher high in the security is normal for an uptrend, but the lower high in the MACD shows less upside momentum.

**Histogram**: The MACD Histogram is simply the difference between the MACD line and the MACD signal line. When a stock, future, or currency pair is moving strongly in a direction, the MACD histogram will increase in height. When the MACD histogram begins to shrink, the market is slowing down and might be warning of a possible reversal.

There are a lot more complicated use cases of MACD using the above-shown methods. In the next article of our MACD MasterClass, we’ll be talking about the Centreline Crossover strategy in a lot more detail. Invest in automated trading bots with Mudrex.

**Stay tuned!**

**Links**

A few quick references below:

- Register now on Mudrex and get $25 bonus: https://mudrex.com/signup
- Support and FAQs: https://support.mudrex.com/hc/en-us
- Connect on our Discord: https://discord.gg/huZz3qP