Moving Average Convergence/Divergence or MACD is a momentum indicator that shows the relationship between two Exponential Moving Averages (EMAs) of a stock price. Convergence happens when two moving averages move toward one another, while divergence occurs when the moving averages move away from each other. This indicator also helps traders to know whether the stock is being extensively bought or sold. Its ability to identify and assess short-term price movements makes this indicator quite useful.

The Moving Average Convergence/Divergence indicator was invented by Gerald Appel in 1979.

Moving Average Convergence/Divergence is calculated using a 12-day EMA and 26-day EMA. It is important to note that both the EMAs are based on closing prices. The convergence and divergence (CD) values have to be calculated first. The CD value is calculated by subtracting the 26-day EMA from the 12-day EMA.

**MACD formula**

*MACD = EMA 12 – EMA 26*

EMA is calculated as:

*EMA _{t }=α * closing price_{t} +(1-α) * EMA_{t-1}*

where t denotes the day of EMA and α denotes the degree of decrease or α = 2/ (t – 1)

## InvestingPro+: Access MACD Data Instantly

Unlock Premium Data With InvestingPro+ 📈💸

Gain instant access to **MACD** data within the InvestingPro+ platform. Plus:

✓ Access to **1200+** additional fundamental metrics

✓ **Competitor comparison** tools

✓ Evaluate stocks with 14+ proven **financial models**

A simple line graph is then projected using the MACD calculated above. This simple line graph is known as the **MACD line.**

Another common term for the MACD line is the **DIFF**, which is just the difference in the two EMAs.

*DIFF = EMA 12 – EMA 26*

Previously, traders traded stocks using the ‘centerline’ approach, which involved drawing a line at point 0 to distinguish between positive and negative areas. When the MACD line crossed below the centerline, it signaled a divergence between the two averages. When this occurred, traders assumed there was rising momentum and looked for buying opportunities. In contrast, when the MACD line crossed the centerline from above, it showed that the two averages were convergent. Whenever this occurred, traders were bearish and looked for selling opportunities. This technique, however, has certain limitations. While waiting for the MACD line to cross the centerline, traders worried they could have missed the upward or downward rally.

To address this issue, traders needed to come up with a new approach. A 9-day EMA of the MACD was displayed on top of the MACD line. This is known as the **signal line**.

Signal line or **DEA** is calculated as the 9-day EMA of the difference of EMA 12 and EMA 26.

So, *DIFF = EMA 12 – EMA 26* and

*DEA = EMA (DIFF, 9)*

The signal line assisted traders in making buy and sell decisions. Traders may buy the stock if the MACD line crosses the signal line from below. If the MACD line crosses the signal line from above, traders may decide to sell the stock.

MACD can either be positive or negative. MACD value is positive when the 12-day EMA (blue line) is above the 26-day EMA. It is important to know that when the stock price is rising, the short-term average will usually be greater than the long-term moving average. This is because the short-term average will be more responsive to the current market price compared to the long-term average. Thus, a positive value indicates a positive momentum in the stock. The greater the momentum, the greater will be the magnitude.

When the 12-day EMA is below the 26-day EMA, the MACD value is negative. A negative value indicates a negative momentum in the stock. The greater the magnitude of the MACD, the stronger will be the downward trend.

The chart above shows the daily price chart of **Apple **(AAPL). The chart indicates that, in August 2022, the 12-day EMA line crossed the 26-day EMA line from below. Positive momentum was seen in Apple’s stock price thereafter. In April 2022, the 12-day EMA line crossed the 26-day EMA line from above. Following that, a downward trend was observed.

MACD indicator identifies the strength of a security’s price trend. It may seem to be complicated at first as it relies on an additional statistical concept known as the Exponential Moving Average (EMA). However, MACD fundamentally supports traders in determining when the recent momentum in a security price may indicate a change in its underlying trend. This helps traders to make appropriate decisions with their entry and exit of trades.

MACD default settings used by the majority of traders while entering trades are 12-day EMA, 26-day EMA, and 9-day EMA.

**MACD settings for day trading**

The MACD can be used for intraday trading with the default 12, 26, 9 settings. However, different traders may use different settings when trading with 5-minute, 15-minute, 30-minute, 1-hour, and daily charts.

Some traders use 24-day EMA, 52-day EMA, and 18-day EMA while trading with 5-minute, 15-minute, 30-minute, 1-hour, and daily charts. Traders use settings which suit them best.

**MACD settings for swing trading**

Swing trading is somewhere between day-trading and long-term trading. Trades in swing trading typically last from a few days to a few weeks. If MACD is below 0 and finds positive divergence, there is a long opportunity. In contrast, if MACD is above 0 and finds negative divergence, there is a short opportunity.

**MACD settings for scalping**

Rather than holding a position for several hours, days or weeks, traders using scalping aim to make a profit in minutes. A common setting is to use 50-day EMA and 100-day EMA. If the 50-EMA indicator surpasses the 100-EMA indicator, it’s a buy signal.

**Best MACD settings for 5-minute chart**

The default 12, 26, 9 settings can be used for 5-minute trading. Some traders prefer 24, 52, and 18 settings for this strategy.

The MACD histogram is primarily used to predict price fluctuations and trend reversals. A histogram is reflected above the baseline when the MACD line (blue line) crosses the signal line (orange line) from below. When the MACD line (blue line) is below the signal line (orange line), a histogram is reflected below the baseline.

*Histogram = MACD – Signal Line*

Furthermore, extreme highs and lows in the histogram imply a slowing of upward and downward momentum, respectively. When this occurs, the curve is likely to revert to its mean.

There are several ways to profit using the MACD signal. Some of these strategies are discussed below:

The MACD crossover happens when the MACD line meets the signal line. Crossovers are very useful when conforming to the current trend. If the MACD line crosses the signal line from below during a downward correction when the stock is in a long period of an uptrend, it confirms a strong bullish signal.

When the MACD line crosses the signal line from above during an upward correction when the stock is in a long period downtrend, it confirms a strong bearish signal.

MACD works perfectly when there are clear uptrends and downtrends in stock price movements. However, MACD crossovers might give false signals when the market is moving sideways.

MACD divergence is primarily used to predict trade reversals. A divergence occurs when MACD projects highs or lows that exceed the corresponding highs and lows on the price.

**Bullish divergence MACD**

When MACD makes two rising lows that correspond to two falling lows in the stock price, a positive divergence occurs. When the long-term trend remains positive, it confirms a valid bullish signal.

**Bearish divergence MACD**

Contrary to this, when the MACD makes two falling highs that correspond to two rising highs in the stock price, a negative divergence occurs. When a long-term trend remains negative, it confirms a valid bearish signal.

However, the above strategy is less dependable. There could be instances where some traders might seek bullish or bearish divergences even when the long-term trend is negative or positive since they can herald a change in the trends.

Both Relative Strength Index (RSI) and Moving Average Convergence/Divergence are momentum indicators that show the connection between two moving averages of stock prices.

The RSI is measured on a scale of 1 to 100. When the RSI reading is between 70 and 100, it suggests that the stock has been highly purchased and is due for a decline. When the reading is between 0 and 30, it suggests that the stock has been severely sold and is due for an upward correction. When using RSI, a number above 50 suggests market bullishness, while a reading below 50 indicates market bearishness.

The MACD evaluates the connection between two Exponential Moving Averages, whereas the RSI monitors price movement concerning recent price highs and lows.

Both these indicators measure momentum in the market, but because they assess distinct parameters, they may produce opposite results. There may be instances where RSI may show a reading beyond 70 for a continuous period while MACD shows a positive value.

The chart above depicts **Wells Fargo’s** (WFC) daily price chart data from April 2020 to June 2021. In November 2020, we can see that the RSI reading has risen above 70 and that the MACD has turned positive.

Stochastic indicators are another type of key indicators in technical analysis. While the MACD relies on moving averages, stochastic indicators use a formula based upon current stock prices along with their highest high prices and lowest low prices in the recent past.

A common stochastic indicator is the Stochastic Oscillator. It is the difference between the current stock price and the lowest low in the last 14 days, divided by the difference between the highest high and the lowest low. The result is multiplied by 100. When the value is above 80, it indicates that the stock is overbought, and when it is below 20, it means the stock is oversold.

To easily identify stocks of your choice at crossovers or showing bullish divergence, you can use stock screeners and select the MACD value range of your choice. Stock screeners offer a great starting point to identify stocks that you may research further. They also allow you to use a combination of different indicators helping you to select stocks that meet all your desired criteria.

The data utilized in MACD is based on a stock’s past price behavior. Since it is based on past data, it must unavoidably lag the price, making MACD a lagging indicator. Furthermore, being a lagging indicator, it proclaims that confirmation of future stock price movement should occur before implementing the signal.

MACD is an important tool of the moving average category. It is best used when trading with daily data. A crossing of the MACD above or below its signal line may also provide a directional signal for some traders, much as a crossover of the 9-day and 14-day SMAs may.

When combined with MACD crossover and divergence, MACD is a valuable trend and momentum indicator that offers obvious buy and sell signals. For more clarity, this indicator can also be used with other technical approaches.

One of the major limitations of using MACD is that it cannot correctly forecast all reversals. MACD does not always provide an accurate analysis of trends. Sometimes the trend signals may fail or show little movement before a reversal happens. MACD may react quickly to changes in direction in the current price action as more weight is given to the most recent data. Crossovers of MACD lines should be observed by traders, but they should be used in combination with other technical indicators for best results.