STC Educational Panel

What is MACD and how to use it to determine market trends and reversals?

March 24, 2023
Read time:

The Moving Average Convergence/Divergence indicator (MACD), is a trading indicator that measures asset momentum. It appears as a line on a separate chart below a stock chart.

MACD represents the relationship between two Exponential Moving Averages (EMAs): the shorter (12-day) and longer (26-day) EMAs.

The interaction between the two EMAs is called Convergence and Divergence:

  • When two averages move toward each other, it is called Convergence.
  • When two averages move away from each other, it is called Divergence.

MACD assumes that comparing recent and long-term price movements provides insight into occurring price trends. When the MACD line moves above zero, the stock gains upward (bullish) momentum. When it moves below zero, the stock gains downward (bearish) momentum.

Another vital component of MACD is the signal line, which is typically illustrated as a 9-day EMA of the MACD itself.

The visual representation of both MACD and the signal line is called the MACD histogram. Investors use it to view momentum changes and quickly spot trend reversals.

The histogram may be positive (when the MACD line is above the 9-day EMA) or negative (when the MACD line is below the EMA).


How to calculate MACD?

The  MACD oscillator is obtained from the difference of two exponential moving averages, one using a faster period (often 12) and one using a slower period (often 26):

MACD = 12-Period EMA − 26-Period EMA

It is calculated using the following steps:

Calculate the 26-day Exponential Moving Average (EMA) of the closing prices of the asset.

Calculate the 12-day Exponential Moving Average (EMA) of the closing prices of the asset.

Subtract the 12-day EMA from the 26-day EMA to get the MACD line.

Calculate a 9-day EMA of the MACD line to create the signal line.
The formula for calculating the signal line is as follows:

Signal Line = 9-day EMA of MACD

5. Plot the MACD line and the signal line on a chart.

Interpret the MACD and signal line crossovers to identify potential buy and sell signals.

The choice of time periods for both EMAs can be adjusted depending on preferences and the characteristics of the analyzed asset.

MACD Divergence

The divergence signal occurs when the cryptocurrency price moves in one direction, but the MACD indicator moves in the opposite direction. Two types of this indicator can be distinguished:

MACD Bullish Divergence

Occurs when the price of an asset makes a new low while the MACD indicator makes a higher low.

This pattern suggests that while the price is moving lower, the momentum of the market is actually starting to shift in a positive direction. The MACD bullish divergence can be a strong indication that a potential trend reversal is on the horizon.

MACD Bearish Divergence

Occurs when the price of an asset reaches a new high, but the MACD indicator fails to follow suit and instead makes a lower high. This indicates that the bullish momentum may be losing strength. This may signal that a bearish reversal could be imminent.

Traders often look for bearish divergences as a signal to sell or short the asset, in anticipation of a price drop.


MACD (Moving Average Convergence Divergence) and RSI (Relative Strength Index) are technical analysis indicators used to evaluate the momentum and trend of financial assets.

MACD uses the difference between two moving averages (usually 12-day and 26-day) to identify potential buying or selling opportunities.

The MACD line is calculated by subtracting the 26-day exponential moving average (EMA) from the 12-day EMA. A signal line (usually a 9-day EMA of the MACD line) is then plotted to indicate potential buy or sell signals. Traders look for bullish and bearish crossovers between the MACD and signal lines to determine trend shifts.

On the other hand, RSI compares the average price gains and losses of a financial asset over a set period (typically 14 days) to determine if it's overbought or oversold. The RSI oscillates between 0 and 100 and is considered overbought when it's above 70 and oversold when it's below 30.

Traders use RSI to identify potential trend reversals, as divergences between price action and RSI can indicate a weakening trend.

While both indicators can identify potential trend reversals and buy/sell signals, they have different strengths and weaknesses. MACD is generally better at identifying trend shifts and crossovers, while RSI is better at indicating overbought and oversold conditions.

Traders may use both indicators in conjunction with other technical analysis tools to confirm signals and make informed trading decisions.


The Moving Average Convergence/Divergence (MACD) is a trading indicator that measures an asset's momentum through two exponential moving averages (EMAs) of different periods. The MACD line, signal line (a 9-day EMA of the MACD), and MACD histogram are used to spot trend reversals and momentum changes in a stock's chart.

MACD is often compared to Relative Strength Index (RSI) as both technical analysis indicators identify trend shifts and buy/sell signals. MACD identifies trend shifts and crossovers better, while RSI indicates overbought and oversold conditions.

Complete quiz
What is MACD and how to use it to determine market trends and reversals?
Share this article
Explore other articles

Stock-to-Flow (S2F) Model

The Stock-to-Flow (S2F) model is an analytical tool used in cryptocurrencies to foresee future asset prices by calculating the ratio of the total supply to the annual incremental supply. The model is based on the assumption that a higher S2F ratio indicates higher rarity and may result in an increase in the asset's value.

What are stablecoins?

Stablecoins are cryptocurrencies pegged to other assets (fiat currencies, precious metals, cryptocurrencies, or algorithms) that solve the problem of crypto volatility and may aid the global adoption of decentralized financial infrastructure.

NFT Royalties

In the world of NFTs, royalties represent the pre-set percentage of the sale that is transferred to the original creator. Payments are made to creators for each use or sale of their work. Royalties can be specified in the smart contract on the blockchain network or negotiated with the buyers upon the initial sale.