KDJ Stochastic

KDJ
Indicator

MomentumSeparate panelFree on ChartLabs

KDJ is a stochastic with three lines. K and D smooth the close's place in the recent high-low range, and J is 3K minus 2D.

An Asian-market form of George Lane's stochastic, 1984. Reviewed by the ChartLabs team, updated Nov 2026.

Example market1hIndicatorsAtlas AIKDJchartlabs.co/charts
Atlas reads it

K is under D.

K 7.4 · D 9.0

Atlas reads it

K is under D.

K 7.4 · D 9.0

Illustration on simulated data.

KDJ StochasticWhat is the KDJ indicator?

KDJ draws three lines in their own panel. K is blue (#2196F3, 2 px), D is orange (#FF9800, 1 px) and J is purple (#9C27B0, 1 px). There are no guide lines. The defaults are length 9, K smoothing 3 and D smoothing 3, and the source is the close.

The raw reading is where the source sits between the highest high and the lowest low of the window, scaled 0 to 100. K starts at 50 and then becomes the previous K, eased toward that raw reading by the K smoothing. D does the same from K. J is 3K minus 2D, so it runs outside 0 and 100 whenever K and D separate. On the first bar, K, D and J are all 50. The recursion starts on the second bar. Before 9 bars exist, the high and the low are the extremes so far.

If the high equals the low, K and D stay where they were. A missing price leaves the bar blank and does not move the lines. There is no single paper that owns this three-line form. It is the common KDJ variant of Lane's stochastic.

J is not smoothed

J is arithmetic: 3 times K minus 2 times D. It has no length of its own.

Starts at 50

The first bar does not apply a raw reading. K and D are seeded at 50, and J follows.

KDJ signalsFive patterns to know.

1Bullish lean

K crosses above D

The faster smooth has turned up through the slower one.

2Bearish lean

K crosses under D

K has turned down through D.

3Inconclusive

K above 80

The close is near the top of the recent high-low range, after smoothing. A trend can keep it there.

4Inconclusive

K below 20

The close is near the bottom of that range.

5Inconclusive

J pulled away from K and D

K and D have separated, so J, which is 3K minus 2D, is outside the pair. It snaps back when they meet again.

KDJ formulaHow it is calculated.

K=2K+RSV3D=2D+K3J=3K−2D
STEP 1

Place the close in the range

RSV is 100 times (source minus the lowest low) divided by (highest high minus lowest low), over 9 bars, or fewer at the start. The source defaults to the close.

STEP 2

Smooth twice from 50

On bar 1, K, D and J are 50. After that, K is (2 times the previous K plus RSV) / 3, and D is (2 times the previous D plus K) / 3. Those are the default smoothings of 3.

STEP 3

Build J

J is 3K minus 2D. If the high equals the low, keep K and D and still draw J from them, as long as the prices are real.

KDJ settingsEvery setting, explained.

SettingDefaultRangeWhat it changes
Length91 to 5,000Bars in the highest high and lowest low. The Signal lens on this page changes this.
K smoothing31 to 5,000How heavily the previous K is kept. 3 means the new raw reading is one third of K.
D smoothing31 to 5,000How heavily the previous D is kept when it is eased toward K.
SourceCloseAny price, or volumeThe price placed inside the high-low range. The range itself always uses high and low.
LinesK #2196F3 at 2 px, D #FF9800, J #9C27B0FixedNo guide lines.
Setting
Length
Default
9
Range
1 to 5,000
What it changes
Bars in the highest high and lowest low. The Signal lens on this page changes this.
Setting
K smoothing
Default
3
Range
1 to 5,000
What it changes
How heavily the previous K is kept. 3 means the new raw reading is one third of K.
Setting
D smoothing
Default
3
Range
1 to 5,000
What it changes
How heavily the previous D is kept when it is eased toward K.
Setting
Source
Default
Close
Range
Any price, or volume
What it changes
The price placed inside the high-low range. The range itself always uses high and low.
Setting
Lines
Default
K #2196F3 at 2 px, D #FF9800, J #9C27B0
Range
Fixed
What it changes
No guide lines.
977 turns of K in view
70,20866,82563,44360,06164,803.7

Drag to see how the setting changes the lines and how many signals you get. Illustration on simulated data.

KDJ strategiesUse it in 3 setups.

K cross of D

IfKcrosses aboveDexit whenit crosses back

The standard stochastic cross. Traders often want it in the direction of a slower trend tool.

A cross that starts from low K

IfKcrosses up while under20

K was near the bottom of the range. The cross says it has turned. It can keep falling after one cross.

J snapping back as a warning

IfJis far fromKthenexpect K to be stretched

J far from the pair means K and D disagree. It is context for the next cross, not a separate entry.

Test a rule in the Strategy TesterFree with 1 year of history. Past results do not guarantee future results.

KDJ mistakesCommon mistakes.

Treating J above 100 as a signal of its own

J goes outside 0 to 100 whenever K and D separate. That is the formula, not an event.

Fading K at 80 in a trend

K near 80 means the close is still near the top of the window. A trend keeps making highs, so K can stay high.

Taking every cross in the middle

Around 50 the lines cross on small moves inside the range. Most of those crosses fail.

KDJ combinationsPair it with these.

KDJ FAQQuestions traders ask.

What are the default KDJ settings?

Length 9, K smoothing 3, D smoothing 3, source close. J has no length. It is 3K minus 2D.

What is J?

Three times K minus two times D. When K is above D, J is above K. When they meet, J meets them too.

Why do the lines start at 50?

The first bar does not compute a raw reading. K and D are seeded at 50, J is 50, and the smoothing starts on the next bar.

What if the high equals the low?

The raw reading would divide by zero, so K and D stay put and J is drawn from those carried values.

Are there 20 and 80 lines?

Not on this indicator. Those are reading habits from the stochastic. ChartLabs draws K, D and J only.

Is KDJ leading or lagging?

It places the latest close in a window of past highs and lows, then smooths that. It follows.

Does KDJ repaint?

No. Closed bars keep K, D and J. The live bar moves until it closes.

What timeframe can I use?

Any. A short length on a short chart crosses very often.

Who created KDJ?

It is a widely used variant of George Lane's stochastic (Technical Analysis of Stocks & Commodities, 1984). There is no single paper that introduces the J line.

Related indicatorsMore momentum tools.

All momentum indicators

Try KDJ on a live chart.
Free. No download.

Works in your browser and on iPhone too.

Example market1h
KDJ Stochastic (9, 3, 3)