Relative Strength Index (RSI)
Returns the Relative Strength Index, a momentum oscillator that measures the speed and magnitude of recent price changes to evaluate overbought or oversold conditions.
How RSI Works
RSI oscillates between 0 and 100:
- RSI > 70: Generally considered overbought (potential sell signal)
- RSI < 30: Generally considered oversold (potential buy signal)
- RSI = 50: Neutral momentum
Parameters
| Parameter | Description | Default |
|---|---|---|
| Symbol | Stock ticker symbol | Required |
| Days | Number of periods for calculation | 14 |
| StartDate | Calculate RSI as of this date | Today |
Calculation
RSI = 100 - (100 / (1 + RS))
Where RS = Average Gain / Average Loss over the period.
Syntax
=RelativeStrengthIndex(Symbol, [Days], [StartDate])Parameters
Stock ticker symbol
Number of periods for RSI calculation
Start date for calculation (defaults to today)
Returns
RSI value between 0 and 100
Examples
=RelativeStrengthIndex("AAPL")=RelativeStrengthIndex("AAPL", "14")=RelativeStrengthIndex("MSFT", "21")=RelativeStrengthIndex("SPY", "9")=RelativeStrengthIndex("AAPL", "14", DATE(2024,1,15))When to Use
- Identify overbought and oversold conditions
- Confirm trend strength and potential reversals
- Generate buy/sell signals based on RSI thresholds
- Compare momentum across multiple stocks
- Technical analysis and trading strategies
When NOT to Use
| Scenario | Use Instead |
|---|---|
| Need moving averages | SimpleMovingAverage() or ExponentialMovingAverage() |
| Need volume-weighted indicator | MoneyFlowIndex() |
| Need trend direction | PlusDirectionalIndicator() or MinusDirectionalIndicator() |
| Need volatility measure | AverageTrueRange() or StandardDeviationOnClosePrice() |
Common Issues & FAQ
Why is RSI returning "NA"?
Check that:
- The symbol is valid and actively traded
- There is sufficient historical data for the period
- The date format is correct (YYYY-MM-DD)
What period should I use?
The default 14-day period is most common. Shorter periods (7-9) are more sensitive, longer periods (21-25) are smoother.
How do I interpret RSI divergence?
When price makes new highs but RSI doesn't (bearish divergence) or price makes new lows but RSI doesn't (bullish divergence), it may signal a reversal.
Excel Templates Using Relative Strength Index (RSI)
These ready-made MarketXLS templates call RelativeStrengthIndex() in their worksheet formulas. Open one to see the function working inside a complete model.
Related Formulas
More MarketXLS Technical Indicators formulas you can use in the same worksheet:
- SMA (Simple Moving Average)
- Standard Deviation
- Technical Score
- Two Hundred Days Moving Average
- 200-Day Moving Average
- 50-Day Moving Average
- Average Daily Volume
- Average True Range (ATR)
See RelativeStrengthIndex used in a complete workbook: Defensive Stock Screener Excel: Build an April 2026 Higher-for-Longer Watchlist
