The moving average convergence divergence (MACD) is another trend-following momentum indicator that shows the relationship between two moving averages of a security’s price. The MACD is calculated by subtracting the 26-period exponential moving average (EMA) from the 12-period EMA. The result of that calculation is the MACD line.
A nine-day EMA of the MACD, called the signal line, is then plotted on top of the MACD line. It can function as a trigger for buy and sell signals. Traders may buy the security when the MACD crosses above its signal line and sell, or short, the security when the MACD crosses below the signal line.
The RSI was designed to indicate whether a security is overbought or oversold in relation to recent price levels. It’s calculated using average price gains and losses over a given period of time. The default time period is 14 periods, with values bounded from 0 to 100.
The MACD measures the relationship between two EMAs, while the RSI measures price change momentum in relation to recent price highs and lows. These two indicators are often used together to provide analysts with a more complete technical picture of a market.
These indicators both measure the momentum of an asset. However, they measure different factors, so they sometimes give contradictory indications. For example, the RSI may show a reading above 70 for a sustained period of time, indicating a security is overextended on the buy side.
At the same time, the MACD could indicate that buying momentum is still increasing for the security. Either indicator may signal an upcoming trend change by showing divergence from price (the price continues higher while the indicator turns lower, or vice versa).