Calculate the Relative Strength Index (RSI) with MarketXLS in Excel

The Relative Strength Index (RSI) is a popular momentum oscillator that measures the speed and magnitude of price changes in a stock or security. With the MarketXLS Excel Add-in’s built-in function, you can easily fetch and calculate RSI values directly in your spreadsheet. By specifying symbol ticker, time period, and an optional start date, you can adapt RSI outputs to your unique investing or trading style without leaving Excel.

Why Use This Function?

  • Streamlines RSI calculations with real-time or cached market data.
  • Simplifies technical analysis—no manual calculations.
  • Supports traditional 14-day RSI or custom timeframes.
  • Lets you specify a start date for calculating RSI from a particular point in time.
  • Integrates seamlessly into Excel, making it easy to combine RSI with other functions or formulas.

Whether you're comparing multiple stocks, refining a trading strategy, or simply exploring market trends, the RelativeStrengthIndex function delivers reliable RSI data right inside your spreadsheet.

How to Use in Excel

=RelativeStrengthIndex(Symbol, [Days], [StartDate])

• Symbol (required): The stock or security ticker symbol in quotes (e.g., "AAPL").
• Days (optional): The period for RSI calculations. Defaults to "14" if omitted.
• StartDate (optional): A date (in Excel date format) from which to start evaluating RSI. Defaults to today’s date if omitted.

Simply enter the formula into any cell in Excel, pressing Enter to reveal the RSI value. If the data is currently refreshing, the function may briefly return “Refreshing,” and then update once data is available.

Parameters Explained

Parameter Description Example Values Notes
Symbol The ticker symbol of the security to evaluate. "AAPL", "MSFT", "TSLA" Must be a string (text) and a valid stock or security symbol.
Days Number of periods (or special intervals) for the RSI calculation. "14", "10weeks", "3months" Defaults to "14" if left blank. When set to "1", returns "NA" (not enough data to compute RSI). "weeks" or "months" strings resample data accordingly.
StartDate Optional date for when to begin the calculation. 01/01/2023 Uses today’s date if omitted. Useful to analyze RSI from a specific start date.

• If Days includes “weeks” or “months” (e.g., "14weeks", "2months"), the function automatically fetches and analyzes data at weekly or monthly intervals.
• If Days = "1", the function returns “NA” because the system deems one day insufficient to calculate RSI.

Example Usage

Basic Examples

  1. Calculate the default 14-day RSI for Apple:
    =RelativeStrengthIndex("AAPL")
    • Uses 14 days as default.
    • Pulls the most recent price data for Apple.

  2. Calculate RSI with a custom period for Microsoft (20 days):
    =RelativeStrengthIndex("MSFT", "20")
    • Returns RSI value based on the last 20 trading days.

  3. Set a specific start date for Tesla’s RSI:
    =RelativeStrengthIndex("TSLA", "14", DATE(2023,1,1))
    • Requests RSI from January 1, 2023, onward.

Advanced Scenarios

  1. Weekly RSI for Netflix using a 6-week lookback:
    =RelativeStrengthIndex("NFLX", "6weeks")
    • Automatically resamples daily data into weekly intervals before calculating RSI.
    • Great for analyzing medium-term trends.

  2. Monthly RSI for Amazon with a 3-month interval:
    =RelativeStrengthIndex("AMZN", "3months")
    • Resamples the data by month, then calculates RSI based on the monthly closing prices.

  3. Integrating with Other Excel Functions:
    =IF(RelativeStrengthIndex("GOOG") < 30, "Buy Signal", "No Action")
    • Example of combining RSI with a logical condition to generate a simple alert.

Common Questions and Troubleshooting

• Why do I get “NA” as a result?

  • If “Days” is set to “1” (or a non-numeric value not recognized), the function returns “NA.” Also, invalid symbols or inaccessible API data can result in “NA.”
    • What does “Refreshing” mean?
  • The data is presently being refreshed. The function will update once the data is available.
    • Can I use a different timeframe than 14 days?
  • Yes. You can specify any integer value you like for Days, or even use “weeks” or “months” to pull weekly or monthly RSI data.
    • Are start dates mandatory?
  • No. If none is provided, MarketXLS uses today’s date for gathering the most up-to-date RSI.

Remember:
• The function pulls real US market data directly into your Excel, so ensure you have a valid MarketXLS subscription/license.
• Adjusting “Days” can yield valuable perspectives on momentum—shorter periods respond quicker to price moves, while longer stretches filter out short-term volatility.
• For deeper analysis, combine your RSI results with other built-in MarketXLS functions such as SMA, EMA, or MACD.

By leveraging the RelativeStrengthIndex function in MarketXLS, you gain a powerful tool to track price momentum directly in Excel. With flexible parameters for timeframes and start dates, it fits effortlessly into robust trading models, everyday market monitoring, or strategic investment decisions—no additional plugins required. Happy analyzing!

Get Access to 1 Billion Usable Market data points IN YOUR EXCEL SHEETS WITH EASY TO USE EXCEL FUNCTIONS

Get started today
MarketXLS Excel Add-in Tutorial - How to Use RSI and Other Financial Formulas
How does MarketXLS work?