KDJ
Indicator
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.
K is under D.
K 7.4 · D 9.0
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.
K crosses above D
The faster smooth has turned up through the slower one.
K crosses under D
K has turned down through D.
K above 80
The close is near the top of the recent high-low range, after smoothing. A trend can keep it there.
K below 20
The close is near the bottom of that range.
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.
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.
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.
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.
| Setting | Default | Range | What it changes |
|---|---|---|---|
| Length | 9 | 1 to 5,000 | Bars in the highest high and lowest low. The Signal lens on this page changes this. |
| K smoothing | 3 | 1 to 5,000 | How heavily the previous K is kept. 3 means the new raw reading is one third of K. |
| D smoothing | 3 | 1 to 5,000 | How heavily the previous D is kept when it is eased toward K. |
| Source | Close | Any price, or volume | The price placed inside the high-low range. The range itself always uses high and low. |
| Lines | K #2196F3 at 2 px, D #FF9800, J #9C27B0 | Fixed | No 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.
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
The standard stochastic cross. Traders often want it in the direction of a slower trend tool.
A cross that starts from low K
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
J far from the pair means K and D disagree. It is context for the next cross, not a separate entry.
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 + Stochastic
Lane's stochastic next to this three-line form, so the J line is the visible difference.
KDJ + RSI
RSI adds a momentum read that does not use the high-low window.
KDJ + EMA 200
Take K crosses only on the EMA's side of price.
KDJ + ADX
Skip middle-of-the-range crosses while ADX says there is no trend.
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 indicatorsTry KDJ on a live chart.
Free. No download.
Works in your browser and on iPhone too.