Skip to content

KDJ

An oscillator based on Stochastic with a J line that amplifies overbought/oversold signals. KDJ is a modification of the stochastic oscillator that adds a J line = 3K - 2D. The J line often goes beyond the 0–100 range, providing earlier signals. Crossovers of K and D are used as entry/exit signals, and the J line signals reversal points.

Formula:

RSV = (Close - Lowest(Low,r)) / (Highest(High,r) - Lowest(Low,r)) * 100
K = SMA(RSV, k_period)
D = SMA(K, d_period)
J = 3K - 2D
ParameterTypeDefaultRange / Values
D Periodint31-50
K Periodint31-50
R Periodint91-50
TriggerDirectionConditionDescription
Level cross up🟢 BuyThe indicator value crossed the specified level from below to above.The indicator value crosses the specified level (level), moving from below to above. Used for crossing the zero level (RSI 50, MACD 0) or an arbitrary threshold.
Level cross down🔴 SellThe indicator value crossed the specified level from above to below.The indicator value drops below the specified level (level).
Value above level by N🟢 BuyThe indicator value rose above the level by the specified distance.Fires when the indicator value crosses the threshold (level + distance), moving up. Allows delaying entry until a breakout of the level is confirmed.
Value below level by N🔴 SellThe indicator value dropped below the level by the specified distance.Fires when the indicator value crosses the threshold (level - distance), moving down.
Value rising🟢 BuyThe indicator value is rising relative to the previous bar.The indicator value on the current bar is greater than on the previous one. The simplest indicator of upward momentum.
Value falling🔴 SellThe indicator value is falling relative to the previous bar.The indicator value on the current bar is less than on the previous one. The simplest indicator of downward momentum. Generates a signal on every declining bar.
Slope turns positive🟢 BuyThe indicator slope turned positive — an upward reversal.The derivative (slope) of the indicator line crossed zero from below to above, i.e. the indicator stopped falling and started rising. Signals a change in the direction of the indicator’s movement.
Slope turns negative🔴 SellThe indicator slope turned negative — a downward reversal.The derivative of the indicator line crossed zero from above to below, i.e. the indicator stopped rising and started falling.
K crosses D up🟢 BuyThe K line of the Stochastic / KDJ crossed the D line from below to above.The fast K line crosses the slow D line from below to above — a classic bullish stochastic signal. Most reliable when the crossover occurs in the oversold zone (values below 20–30).
K crosses D down🔴 SellThe K line of the Stochastic / KDJ crossed the D line from above to below.The fast K line crosses the slow D line from above to below — a classic bearish stochastic signal. Most reliable when the crossover occurs in the overbought zone (values above 70–80).
Enter overbought zone🔴 SellThe oscillator entered the overbought zone.The oscillator value crossed the overbought threshold from below to above. It means that the price is actively rising and has reached an extreme level. In a counter-trend strategy it can be used as a sell signal.
Enter oversold zone🟢 BuyThe oscillator entered the oversold zone.The oscillator value crossed the oversold threshold from above to below. It means that the price is actively falling. In a counter-trend strategy it can be used as a buy signal.
Exit overbought zone🔴 SellThe oscillator exited the overbought zone.The oscillator value returned below the overbought threshold. Signals a decline in upward momentum.
Exit oversold zone🟢 BuyThe oscillator exited the oversold zone.The oscillator value returned above the oversold threshold. Signals a decline in downward momentum.
ParameterTypeDefaultRange / Values
Overbought (Enter overbought zone, Exit overbought zone)float8050-100
Oversold (Enter oversold zone, Exit oversold zone)float200-50
Level (Value above level by N, Value below level by N, Level cross up, Level cross down)float0
Distance (Value above level by N, Value below level by N)float00>