kdj#

API documentation for pandas_ta.momentum.kdj Python function.

kdj(high=None, low=None, close=None, length=None, signal=None, offset=None, **kwargs)[source]#

KDJ (KDJ)

The KDJ indicator is actually a derived form of the Slow Stochastic with the only difference being an extra line called the J line. The J line represents the divergence of the %D value from the %K. The value of J can go beyond [0, 100] for %K and %D lines on the chart.

Sources:

https://www.prorealcode.com/prorealtime-indicators/kdj/ https://docs.anychart.com/Stock_Charts/Technical_Indicators/Mathematical_Description#kdj

Calculation:
Default Inputs:

length=9, signal=3

LL = low for last 9 periods HH = high for last 9 periods

FAST_K = 100 * (close - LL) / (HH - LL)

K = RMA(FAST_K, signal) D = RMA(K, signal) J = 3K - 2D

Args:

high (pd.Series): Series of ‘high’s low (pd.Series): Series of ‘low’s close (pd.Series): Series of ‘close’s length (int): Default: 9 signal (int): Default: 3 offset (int): How many periods to offset the result. Default: 0

Kwargs:

fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method

Returns:

pd.Series: New feature generated.