KDJ

Calculates the KDJ indicator, based on Stochastic and Stochastic Signal.

Accepts the following parameters:

Parameter NameTypeDefault ValueNotes
kPeriodNumber5-
slowingNumber3-
dPeriodNumber3-
kMultiplierNumber3-
dMultiplierNumber2-

Returns: Series<Number>

KDJ is a built-in function - you can use it directly. Below is an example implementation:

1 function KDJ(kPeriod = 5, slowing = 3, dPeriod = 3, kMultiplier = 3, dMultiplier = 2):
2 kMultiplier * Stochastic(kPeriod, slowing) - dMultiplier * StochasticSignal(kPeriod, slowing, dPeriod)