
    i	                     r    S SK JrJr  S SKJrJr  S SKJrJrJ	r	J
r
Jr    SS\S\S\S\S	\S
\S\S\4S jjrg)    )	DataFrameSeries)DictLikeInt)non_zero_rangepd_rmav_offsetv_pos_defaultv_seriesNhighlowcloselengthsignaloffsetkwargsreturnc                    [        US5      n[        US5      nX4-   S-   n[        X5      n [        X5      n[        X'5      nU b  Ub  Uc  g[        U5      nU R                  U5      R	                  5       nUR                  U5      R                  5       n	SX)-
  -  [        X5      -  n
[        XS9n[        XS9nSU-  SU-  -
  nUS:w  a3  UR                  U5      nUR                  U5      nUR                  U5      nS	U;   a9  UR                  US	   S
S9  UR                  US	   S
S9  UR                  US	   S
S9  SU SU 3nSU 3Ul
        SU 3Ul
        SU 3Ul
        S=Ul        =Ul        Ul        UR                  XR                  XR                  U0n[        XR                  S9nSU 3Ul
        SUl        U$ )a/  KDJ

This indicator, derived from the Slow Stochastic, includes an
extra signal named the J line. The J line represents the divergence
of the %D value from the %K.

Sources:
    * [anychart](https://docs.anychart.com/Stock_Charts/Technical_Indicators/Mathematical_Description#kdj)
    * [prorealcode](https://www.prorealcode.com/prorealtime-indicators/kdj/)

Parameters:
    high (Series): ```high``` Series
    low (Series): ```low``` Series
    close (Series): ```close``` Series
    length (int): The period. Default: ```9```
    signal (int): Signal period. Default: ```3```
    offset (int): Post shift. Default: ```0```

Other Parameters:
    fillna (value): ```pd.DataFrame.fillna(value)```

Returns:
    (DataFrame): 3 columns

Note:
    The J can go beyond ```[0, 100]``` for %K and %D lines when charted.
	         Nd   )n   r   fillnaT)inplace_KDJmomentum)indexKDJ)r
   r   r	   rollingmaxminr   r   shiftr   namecategoryr   r"   )r   r   r   r   r   r   r   _lengthhighest_high
lowest_lowfastkkdj_propsdatadfs                    Q/var/www/html/trading/venv/lib/python3.13/site-packages/pandas_ta/momentum/kdj.pykdjr5      s   B 61%F61%Fo!GD"D
3
 CU$E|s{emfF <<'++-LV$((*J5%&|01E 	uAqA	AAA {GGFOGGFOGGFO 6	!40	!40	!40 &"F\AF\AF\AF+55AJ5ajFFAvvq&&!,D	4{{	+BF8nBGBKI    )NNN)pandasr   r   pandas_ta._typingr   r   pandas_ta.utilsr   r   r	   r
   r   r5    r6   r4   <module>r;      sq    $ +  '+P
PP&,PP #P P #+P 	Pr6   