Skip to content

charton API


charton API / @chart-on/ta / kdj

Function: kdj() ​

kdj(high, low, close, length, kSmooth, dSmooth, out?): Kdj

Defined in: kdj.ts:29

KDJ: where the close sits in the length-bar high-low range (RSV, 0 to 100, 50 for a zero range), smoothed into K with weight 1 / kSmooth, K smoothed into D with weight 1 / dSmooth, and J = 3K - 2D. K and D start from 50 before the first value, so the first K is 50 + (rsv - 50) / kSmooth. Lookback length - 1. A NaN input restarts both from 50.

Parameters ​

high ​

Series

low ​

Series

close ​

Series

length ​

number

kSmooth ​

number

dSmooth ​

number

out? ​

Kdj

Returns ​

Kdj