What is RSI indicator?
RSI is a momentum-based oscillator created by J. Welles Wilder Jr.
How to calculate RSI?
Due to the nature of the calculation, we start with a slightly different formula for the first period.
Let’s say we use a 14 day RSI. On Day 14 of our data, we can calculate the first RSI.
Calculations for the first RSI – On Day 14
- On Day 14, we calculate Avg. Gain of 14 days using a simple average of gain on each of the 14 days. A gain is measured as Closing Price – Closing Price on Previous Day. If there is no gain, it is measured as 0 gain.
- Similarly, on Day 14, we calculate Avg. Loss of 14 days using a simple average of gain on each of the 14 days. A gain is measured as Closing Price – Closing Price on Previous Day. If there is no gain, it is measured as 0 gain.
- Relative Strength RS = Avg Gain/Avg Loss
- Relative Strength RSI = 100 – 100/(1+RS)
Calculations for all subsequent RSIs – from Day 15
On Subsequent days (from Day 15), the calculations for Avg. Gain and Avg. Loss change as below.
- Avg. Gain is measured as (Prev Day Avg Gain * 13) + Current Day Gain
- Avg. Loss is measured as (Prev Day Avg Loss * 13) + Current Day Loss
- Relative Strength RS = Avg Gain/Avg Loss
- Relative Strength RSI = 100 – 100/(1+RS)
Due to the nature of the calculations, depending on your starting point, the RSI values may differ slightly. For example, if you start with a 5 year historical data for a stock, your RSI may be different from your RSI if you start with 1 year historical data.
RSI is represented as a line on the chart and its values range from 0 to 100. Lower the RSI, the weaker the price momentum. Higher the RSI, the stronger the price momentum.
What trading signals are observed from RSI indicator?
According to Wilder, any number above 70 should be considered overbought and any number below 30 should be considered oversold.
An RSI between 30 and 70 was to be considered neutral and an RSI around 50 signified “no trend”.
Some traders believe that Wilder’s overbought/oversold ranges are too wide and choose to alter those ranges. For example, someone might consider any number above 80 as overbought and anything below 20 as oversold. This is entirely at the trader’s discretion. TradingView
The following is an example signal strategy
- Buy when the RSI drops below the Minimum threshold (30 by default)
- Sell when the RSI exceeds above the Maximum threshold (70 by default)
Is there a free version of this template?
We have a free RSI template you can use to calculate RSI indicator for any stock symbol.
RSI Indicator Excel Template - Technical Analysis - Stock Market
Does the template consider fees?
The template assumes no commissions or fees in its profit calculation. If you need any assistance with incorporating this, please contact us.
Can the template handle short trading?
Yes, the template handles short trading actions.
Does it work for international exchanges?
Yes, please see this article for exchanges supported by Microsoft
How does the template decide trading decision?
The template calculates the signal events for each day based on the closing prices. The trade itself will be made on the following day opening of market.
Let's say on a specific day (Jan 14, 2025) there is a Buy Signal Line. Then, the template will initiate a trade on next trading day (Jan 15, 2025) for the Opening price. Trading action (whether to enter or exit a trade and whether it is a Long or Short trade) will depend on what you have chosen in the settings in the template. It's customizable.