
    ia                     |    S SK Jr  S SKJrJr  S SKJr  S SKJrJ	r	J
r
  SSKJr     SS\S	\S
\S\S\S\S\4S jjrg)    )Series)DictLikeInt)wma)v_offsetv_pos_defaultv_series   )rocNcloselengthfastslowoffsetkwargsreturnc                 b   [        US5      n[        US5      n[        US5      nX-   U-   n[        X5      n U c  g[        U5      n[        X5      [        X5      -   n[	        Xq5      nUS:w  a  UR                  U5      nSU;   a  UR                  US   SS9  S	U S
U S
U 3Ul        SUl        U$ )a  Coppock Curve

This indicator, by Edwin Coppock 1962, was originally called the
"Trendex Model", attempts to identify major upturns and downturns.

Sources:
    * [wikipedia](https://en.wikipedia.org/wiki/Coppock_curve)

Parameters:
    close (Series): ```close``` Series
    length (int): WMA period. Default: ```10```
    fast (int): Fast ROC period. Default: ```11```
    slow (int): Slow ROC period. Default: ```14```
    offset (int): Post shift. Default: ```0```

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

Returns:
    (Series): 1 column

Note:
    Although designed for monthly use, a daily calculation over the same
    period length can be made, converting the periods to 294-day and
    231-day rate of changes, and a 210-day WMA.


         Nr   fillnaT)inplaceCOPC__momentum)	r   r	   r   r   r   shiftr   namecategory)	r   r   r   r   r   r   _length	total_roccoppocks	            U/var/www/html/trading/venv/lib/python3.13/site-packages/pandas_ta/momentum/coppock.pyr!   r!   
   s    B 62&Fr"Dr"Dmd"GU$E}fF E 3u#33I)$G {--' 6vh'6 4&$q1GL!GN    )NNNN)pandasr   pandas_ta._typingr   r   pandas_ta.overlapr   pandas_ta.utilsr   r   r	   r   r!    r#   r"   <module>r)      se     + ! = = 
 "&"&<<<
<< < #+< 	<r#   