STOCHRSI (Stochastic Relative Strength Index)

Indicator Description

STOCHRSI (Stochastic Relative Strength Index) is a momentum indicator that combines the RSI indicator with the Stochastic indicator, measuring the strength of price momentum by calculating the position of RSI within a specified period.

Function Information

  • Function Name: STOCHRSI
  • Input Parameters:
    • Close: Closing price
  • Parameter Settings:
    • timeperiod: Calculation period, default 14
    • fastk_period: Fast K period, default 5
    • fastd_period: Signal line period, default 3
    • fastd_matype: Signal line moving average type, default 0
  • Output:
    • fastk: Fast K line
    • fastd: Fast D line

Calculation Principle

STOCHRSI is calculated using the following formula:

RSI = 100 - (100 / (1 + RS))
%K = 100 * (RSI - Lowest RSI) / (Highest RSI - Lowest RSI)
%D = SMA(%K, fastd_period)

Where:

  • RSI is the Relative Strength Index
  • Lowest RSI is the lowest RSI value in the period
  • Highest RSI is the highest RSI value in the period
  • SMA is Simple Moving Average

Usage Scenarios

  1. Overbought/Oversold Analysis
  2. Trend Confirmation
  3. Trading Signal Generation
  4. Divergence Analysis

Usage Recommendations

  1. %K > 80 indicates overbought conditions
  2. %K < 20 indicates oversold conditions
  3. Watch for %K and %D crossovers
  4. Pay attention to divergence patterns
Last Updated: