MOMENTUM & OSCILLATORS
KDJ
A stochastic with a third, exaggerated line.
spec id: kdjoutputs: k · d · jlength (default 9)
What does KDJ measure?
A stochastic with a third, exaggerated line. The J line overshoots past 0 and 100, which is exactly why traders watch it for extremes.
How is KDJ calculated?
Find where the close sits between the lowest low and highest high of the last 9 candles. Smooth that twice, each time keeping two thirds of the old value — that gives `k` and `d`. `j` is three times `k` minus two times `d`.
Written by reading the engine’s real computation, not a textbook — where the two differ, the page describes what actually runs.
How do I use KDJ in a bot?
In the builder, add an indicator of type kdj (parameters: length, default 9). Its output series — k, d, j — become operands you can compare in any entry or exit rule. The engine grades the whole rule honestly: real fills, no look-ahead, half the history held back.
Related indicators
- Know sure thingA long-horizon momentum curve that blends four different look-backs, so it is slow to be fooled by a single fast move.
- Laguerre RSIAn ultra-smooth 0-to-1 momentum gauge that barely lags.
- MACDA momentum gauge that shows when a trend is speeding up or running out of steam.
- MomentumHow much the price has changed over a set stretch, as a fraction.
Or browse all 158 indicators in the full library.