MACD vs RSI: trend momentum or overbought and oversold
By Oalgo · Last reviewed
MACD shows trend momentum: it is the gap between a fast and a slow moving average, so it turns after price has moved. RSI compares recent up moves with down moves on a scale from 0 to 100 and is read as a level, such as overbought or oversold.
What do the two look like on the same prices?
#How do MACD and RSI differ?
#| MACD | RSI | |
|---|---|---|
| What it measures | The gap between a 12-period and a 26-period EMA | Up moves compared with down moves over 14 candles |
| Scale | In price units, with no fixed top or bottom | Between 0 and 100, on any prices |
| Lines | The MACD line, the average line (a 9-period EMA of the MACD line) and the histogram | One line |
| A usual rule | The MACD line crossing above or below the average line, or zero | RSI falling below 30 or rising above 70 |
| How to read it | The sign and the crossings show momentum. It follows price, so it turns after price has turned | The level shows how strong recent moves were, read against 30 and 70 |
| Where it struggles | A sideways market: the two lines cross back and forth | A strong trend: it can stay above 70 or below 30 for a long time |
Because MACD is in price units, a value that is large for one market is small for another. RSI stays between 0 and 100, so its levels mean the same thing on any prices.
When do people use each?
#- MACD: to follow the direction of a trend, with a rule on the MACD line crossing the average line or zero.
- RSI: to find moves that went a long way in one direction, with a level such as 30 or 70.
- Together: one for direction and one for the entry, so that two conditions must agree. That adds a setting and can mean fewer trades.
How do you test the choice in Oalgo?
#In Oalgo you can tell Oalgo AI your MACD or RSI rule in your own words, check the rule it builds, and test it. After testing, if you choose, you Go Live with your own Live Strategy on your own Venue Account at a Supported Venue.
- Test each rule alone first, then the two together, with the same Stop Loss and the same dates.
- Run a backtest on a trending period and on a sideways one. MACD and RSI tend to struggle in different ones.
- Check the number of trades and the fees for each version.
- Run a forward test before you decide, with simulated funds.
What can neither tell you?
#Neither says how far a move will go or when it will end. MACD comes after the move has started, and RSI can sit at an extreme while price keeps going. Two indicators agreeing is still two readings of the same past prices.
Read next
- RSI vs Stochastic: how the two oscillators differRSI compares up moves with down moves; the Stochastic oscillator shows where the close sits in its recent range. See how they differ and how to test each.
- MACD crossover strategy: rules and how to test itA MACD crossover enters when the MACD line crosses above its average line and exits on the cross back. See the rules, how to test them, and what they miss.