RSI (Relative Strength Index) Indicator Google Sheets Template
In this article, we will be discussing the RSI (Relative Strength Index) technical indicator that is used to analyze stock performance. RSI is one of the popular technical indicators used by traders.
We shall look at a:
- Brief introduction to the theory or concept behind RSI indicator
- How you can use it to calculate RSI for any stock you are interested in.
What is RSI (Relative Strength Index) Indicator?
RSI is a momentum-based oscillator created by J. Welles Wilder Jr.
How to calculate RSI(Relative Strength Index)?
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 a1 year historical data for a stock, your RSI may be different from your RSI if you start with 6 Month 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.
Trading Signals
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)
RSI Google Sheets Template
The template will help you create the RSI indicator automatically and calculate the trading signals instantly for any stock.
The blue line indicates the closing price and the Orange line the RSI. The shaded area represents the RSI band from the minimum threshold to the maximum threshold.
Download
How to create RSI in Google Sheets?
Type in a stock exchange code (like NASDAQ or NYSE) and the stock symbol (example: “AAPL” for Apple Inc.) as shown on the top left.
Kindly ensure to enter the correct exchange code and stock symbol for Google sheets to recognize the same.
Period
The template can pull up to 1 year of price history by default. You can choose how much history to display on the chart easily using the check box.
The options are 5 Days, 1 Month, 3 Months, 6 Months, 1 Year, Month Till Date, and Year Till Date.
Interval
The template allows price history at 2 different intervals: Daily and Weekly.
Input Parameters
- Source: Closing price is the one that is used for calculations typically. However, you can choose from Open, High, Low, Close or Volume.
- Length: You can type in a length in periods. The commonly used is 14.
- RSI Min: This is the minimum RSI threshold to generate signals. The commonly used is 30.
- RSI Max: This is the maximum RSI threshold to generate signals. The commonly used is 70.
The chart will update automatically based on all the above inputs.
Signals
The template shows two types of signals (Buy, Sell) on the chart.
The following rule generates the signals.
- Buy when the RSI drops below the RSI Minimum threshold (30 by default)
- Sell when the RSI exceeds above the RSI Maximum threshold (70 by default)
In addition, if the latest day has a signal, it will be displayed below the current price.
Time Zone
On the top right you can see the maximum of the last trade time of these currencies.
The default time that Googlefinance function provides is UTC. The offset is set to -7 hrs, to convert to pacific time zone.
You can modify this if you need the time in a different time zone.
Visit https://savvytime.com/converter/utc to view offset.
There will be a 15 minute delay in the stock details which are fetched in the Google sheets.
https://www.google.com/googlefinance/disclaimer/#!#disclaimers
Resources
-
Simple Moving Average Stock Screener Google Sheet Template$25
-
Stock Screener Excel Template$97
-
Simple Moving Average Stock Screener Excel Template$25
-
Product on saleTechnical Analysis Pro Excel Template (25 Technical Indicators)Original price was: $97.$67Current price is: $67.
Feedback
Please share your feedback on this template in the Comments below. If you find this useful, please share with your friends who may benefit from this content.
One Comment
Hi, there is an error in your google sheet for RSI:
In your “Help”-Tab: The Date, Open, High, Low, Close on the right:
The lines end at line 1264! However, if the data from googlefinance on the left side (Date, Open, High, Low, Close) is longer than 1264 lines, the last few days are missing from your calculation.
The Problem ist that you’ve hard coded it here in this calculation: =IFERROR(IF(K4=””,””,IF(AND(K4=C_N_TRADING_DAYS,$L$1>C_MAX_HIST_DT),$M$1,INDEX($C$3:$H$1264,K4+1,2))),NA())
you see on end the : 1264.
You should read the line length of the googlefinance data and use it.
BUT: I love your work! Thank your very much for this amazing work!
Best wishes, Jens