Skip to content

Indicator Description ​

KDJ is a momentum indicator that reflects the overbought and oversold state and trend changes in the market by calculating the relationship between the highest price, lowest price, and closing price.

Function Information ​

  • Function Name: KDJ
  • Input Parameters: High, Low, Close
  • Parameter Settings: timeperiod1 (default: 13), timeperiod2 (default: 5)
  • Output: k, d, j

Calculation Principle ​

KDJ is calculated using the following formula:

RSV = (Close - Lowest Low) / (Highest High - Lowest Low) * 100
K = MA(RSV, timeperiod2)
D = MA(K, timeperiod2)
J = 3 * K - 2 * D

Where RSV is the Raw Stochastic Value, Lowest Low/Highest High are the price extremes in the period, and MA is the moving average.

Usage Scenarios ​

  1. Overbought and oversold judgment
  2. Trend reversal identification
  3. Divergence signal analysis
  4. Trading signal generation

Usage Recommendations ​

  1. K line crossing above D line can be seen as a buy signal
  2. K line crossing below D line can be seen as a sell signal
  3. Use the J value to judge overbought and oversold
  4. Pay attention to the use of divergence signals