RSI (Relative Strength Index)

Indicator Description

RSI (Relative Strength Index) is an overbought/oversold indicator that measures the market's overbought/oversold state by comparing the magnitude of upward and downward movements over a certain period.

Function Information

  • Function Name: RSI
  • Input Parameters: #Kline
  • Parameter Settings: timeperiod (default: 14)
  • Output: RSI value

Calculation Principle

RSI is calculated using the following formula:

Average Gain = SMA(Upward Price Change, timeperiod)
Average Loss = SMA(Downward Price Change, timeperiod)
RS = Average Gain / Average Loss
RSI = 100 - (100 / (1 + RS))

Where:

  • SMA is Simple Moving Average
  • timeperiod is the calculation period
  • Upward Price Change is the magnitude of price increase
  • Downward Price Change is the magnitude of price decrease

Usage Scenarios

  1. Overbought/Oversold assessment
  2. Trend confirmation
  3. Divergence analysis
  4. Trading signal generation

Usage Recommendations

  1. RSI > 70 indicates overbought
  2. RSI < 30 indicates oversold
  3. Pay attention to RSI's 50-line crossovers
  4. Use in conjunction with other indicators
Last Updated: