KDJ runs on MT4 and MT5 and puts three lines in a sub-window: the familiar K and D of a
stochastic, plus J, which is allowed to go where the other two can't.

J is the whole reason this exists
K and D are a stochastic. They live between 0 and 100, and once a strong move pins them
at 95 they stop telling you anything โ there's no room left above.
J is defined as 3K โ 2D. It's a lever on the gap between the two, and it has no
ceiling. On the EURUSD chart below it reaches 106 and drops under โ17. That isn't an
error and it isn't a bug in the scaling; it's the line doing its job. A J of 140 says the
move is much stronger than a J of 101, and your stochastic would have shown 99 for both.

The trade-off is that J is noisy. It turns first, which is useful, and it turns often,
which isn't. That's why the alerts below treat J crossings and K crossings as two
different events.
How the lines are built
Each bar takes the highest high and lowest low of the last 21 bars, and asks where the
close sits inside that range as a percentage. That raw number is RSV.
RSV = 100 ร (close โ lowest) / (highest โ lowest)
K = smoothed RSV over 3
D = smoothed K over 3
J = 3K โ 2D
The smoothing isn't a simple average. It's a running one that keeps a third of the new
value and two thirds of the previous line, which is what makes K lag RSV without the
step-changes a plain moving average would give.
Note the period: 21, not the 9 you may be used to. That's a slower KDJ than the
default in most platforms, and it's deliberate โ 9 on an intraday chart produces a J line
that is almost pure noise. If you want the classic behaviour, set Period to 9 and expect
a lot more crossings.
Four alerts, two kinds
Alert when signal covers the J crossings:
- J crosses down through D while K is below D โ sell.
- J crosses up through D while K is above D โ buy.
The K condition is a filter. J alone crosses D constantly; requiring K to already be on
the same side of D throws away most of that.
Alert when trend change covers the slower event: K crossing D, up or down. Fewer of
these, and they arrive later.
Both can be switched off independently. Notification type covers popup, email, push and
Telegram, and the default is None โ so out of the box it draws and stays silent,
which is the right default for an oscillator you're going to attach to six charts.
Every alert is evaluated once per bar and reads only closed bars, so you get one message
per event and never a repeat.
MT4 and MT5 agree
Both builds are the same arithmetic. On the same H1 gold bar they read:
| K | D | J | |
|---|---|---|---|
| MT5 | 49.8112 | 47.0156 | 55.4024 |
| MT4 | 49.8116 | 47.0172 | 55.4006 |
The differences are in the fourth decimal, and they come from the two terminals holding
slightly different amounts of history behind the recursive smoothing, not from different
formulas.

Repainting, honestly
K, D and J on the bar that is still forming move as price moves. That's true of every
oscillator โ the close hasn't happened yet, so the value can't be final. When the bar
closes, the value freezes and never changes again.
The alerts are a different matter, and this is what people actually mean when they ask.
They're checked once per new bar and they compare bars that have already closed. So a
signal that fires never un-fires, and you won't get the same crossing announced three
times as price wobbles.
What it doesn't do
- No arrows on the price chart. Three lines in a sub-window, nothing else.
- No divergence detection. It gives you the oscillator; the divergence is your read.
- No multi-timeframe. One chart, one period.
- Level lines are fixed at 20, 50 and 80 in the source, not inputs.
- J is drawn in light grey, which on a white chart is nearly invisible. See below.
Settings I'd start with
Change the J colour first. It ships as light grey, and J is the line you attached this
for. Make it something you can see โ the colour is in the indicator's Colors tab, third
line down.
Leave Period at 21 unless you have a reason. Signal K and Signal D at 3 are the standard
pair and there's little to gain from moving them.
Set Notification type only on the one or two charts you actually want to hear from.
What changed in 1.01
Three fixes.
The buy alert said "Sell signal!" โ both platforms. If you had alerts on, every buy
crossing arrived labelled as a sell. The comment on the line above it said buy, so there
was never any doubt what was meant.
On MT4 the buy condition read the wrong bar, and on the current bar that meant reading
index โ1: an out-of-range access that stops the indicator for that tick. It only happened
when K was above D, so an uptrend was exactly when it broke.
A flat 21-bar window would have divided by zero, and because K and D are recursive
that one bad value would sit in every later bar until the chart was reloaded. Rare, but
permanent when it happened, so it's now guarded.
Questions you'll have
Does KDJ repaint? The lines on the forming bar move with price, as any oscillator's
do, and freeze when the bar closes. The alerts read only closed bars and fire once per
event.
Why does J go above 100? Because it's 3K โ 2D, which has no upper bound. That's the
feature โ it keeps giving you information after K and D have run out of room.
Why is the period 21 and not 9? It's a slower setting chosen on purpose. Set it to 9
if you want the classic responsiveness and many more crossings.
MT4? Both platforms are included, one download each. Same arithmetic, agreeing to the
fourth decimal.
I can't see the J line. It's light grey by default. Change its colour in the Colors
tab; it's the third of the three.
What's the difference between the two alert types? Signal alerts fire on J crossing D,
filtered by which side of D the K line is on. Trend alerts fire on K crossing D, which is
slower and less frequent.
Can I get it on more than one timeframe at once? No. Attach it to each chart you want
it on.
Both platform builds are included with a subscription. This listing makes no
profitability claim: the indicator draws three lines from the last 21 bars, and nothing
about a crossing says what price will do next. You won't find a win rate table here, and
I'd be careful with any indicator listing that has one.