In this series, we will take a closer look at one of the most popular and versatile oscillators, RSI or the Relative Strength Index. Oscillators are a popular trading indicator however; they should be used as one trading tool within a larger strategy. Some traders think oscillators alone are a complete trading system, but this is not the case. Today we will look at the basics of RSI and see how it is calculated. In future articles, we will dive head first into much more advanced RSI topics including divergence and the math behind it, trend identification, failure swings, range rules, oscillator support and resistance, and more.
RSI was developed by J. Welles Wilder and featured in his 1978 book,New Concepts in Technical Trading Systems. Wilder created many trading tools still in use today including ATR, ADX, and Parabolic SAR. Volumes have been written about RSI, and it has been featured inCommodity magazine (nowFutures magazine),Active Trader magazine, Constance Brown’s book Technical Analysis for the Trading Professional, and is referenced in countless articles and videos here on DailyFX.
RSI is categorized as an overbought/oversold indicator. It can help traders identify when price has moved too far too fast in one direction, however, it has many more uses. Unlike many other oscillators, such as CCI and MACD, RSI ranges between a minimum value, 0, and a maximum value, 100. This makes it more effective as an overbought/oversold indicator as extreme values are easier to identify. Wilder suggests in his book to use a calculation based on 14 periods and it is calculated using closing prices only.
The formula for RSI is:
RSI = 100 – [100 / (1 + RS)]
RS = [Average Gain / Average Loss]
The RSI calculation can be broken down into three components: RS, Average Gain, and Average Loss. For the first calculation, Average Gain and Loss are simple 14 period averages:
In other words, for the First Average Gain, count back the past 14 closed daily candles, add together the gain in price from open to close on all blue, up candles and divide that sum by 14. For First Average Loss, go through those same 14 closed daily candles, add together the loss in price from open to close on all red, down candles and divide by 14. With that information, we can calculate the first RS by taking First Average Gain and dividing it by First Average Loss.
To calculate the first RSI value, plug the RS number into the formula above.
For an easier calculation, here is a set of made up prices, as well as a corresponding candlestick chart.
To calculate the First Average Gain, we look at all blue candles for the first 14 periods (2-Mar – 15-Mar), add together each gain, and divide that number by 14. For Average Loss, add together each loss, and divide that number by 14. To compute RS, divide Gain by Loss.
Our first RSI calculation is therefore 69.10.
RSI features a smoothing effect which puts a higher weight on the most recent price movement, much like exponential moving averages do. This smoothing effect also takes into account previous prices for as long as the RSI calculation goes back. This is done by taking the previous days Average Gain and Loss to calculate the next value instead of taking just the previous 14 periods. This is reflected in the formula for RS after our first calculation is established. The RSI formula stays the same while the calculation for RS, the variable component of RSI, changes.
To calculate the 15th period of RSI in our example, we first calculate the RS:
The 16th period and all others from here on are calculated with the same formula:
As expected, we had a gain in price in both periods and therefore an increased RSI value showing the strength of the trend is continuing. Here is a chart of the remaining RSI calculations for our example above (numbers vary slightly from ours as we rounded numbers to six decimal places in the above examples).
Now that we know how RSI is calculated, we will be able to better understand the trading signals it offers. In the next article, we will look at overbought and oversold signals, how to trade them, and the best currency pairs to watch for signals on.
Written By: Brandon Leeds
Would you like to know when I publish the next part of this series or any other articles? Add me on twitter: @BrandonPL
Do you like this article? Let David Song or John Kicklighter know you would like to see more articles from me in the future by e-mailing them at This e-mail address is being protected from spambots. You need JavaScript enabled to view it or This e-mail address is being protected from spambots. You need JavaScript enabled to view it