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
- Overbought/Oversold assessment
- Trend confirmation
- Divergence analysis
- Trading signal generation
Usage Recommendations
- RSI > 70 indicates overbought
- RSI < 30 indicates oversold
- Pay attention to RSI's 50-line crossovers
- Use in conjunction with other indicators