
    it                     h    S SK Jr  S SKJrJrJr  S SKJrJrJ	r	  S r
  SS\S\S\S	\S
\S\4S jjrg)    )Series)DictLikeIntIntFloat)v_offsetv_pos_defaultv_seriesc                 `    X!-  U S   U S   -  S-  -  nU S   U S   U S   -
  U-  -   U S'   U S   $ )N   r       )xnkds       Q/var/www/html/trading/venv/lib/python3.13/site-packages/pandas_ta/overlap/mcgd.py_mcgdr      sK    	
!A$1+!#	#AaDQqTAaD[A%&AaDQ4K    Ncloselengthcoffsetkwargsreturnc                    [        US5      n[        X5      n U c  g[        U[        5      (       a  SUs=:  a  S::  a  O  O[        U5      OSn[	        U5      nU R                  5       n U SS R                  SSS9R                  [        XS.SS	9nUS:w  a  UR                  U5      nS
U;   a  UR                  US
   SS9  SU 3Ul        SUl        U$ )a  McGinley Dynamic Indicator

This indicator, by John R. McGinley, is not a moving average but a
differential smoothing technique.

Sources:
    * John R. McGinley, a Certified Market Technician (CMT) and former
      editor of the Market Technicians Association's Journal of
      Technical Analysis.
    * [investopedia](https://www.investopedia.com/articles/forex/09/mcginley-dynamic-indicator.asp)

Parameters:
    close (Series): ```close``` Series
    length (int): The period. Default: ```10```
    c (float): Denominator multiplier. Default: ```1```
    offset (int): Post shift. Default: ```0```

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

Returns:
    (Series): 1 column

Note:
    Sometimes ```c``` is set to ```0.6```.

   Nr   r      )min_periods)r   r   T)r   rawfillna)inplaceMCGD_overlap)r   r	   
isinstancefloatr   copyrollingapplyr   shiftr    namecategory)r   r   r   r   r   mcg_dss         r   mcgdr-      s    > 62&FU#E}q%((QZaZaQAfF JJLE12Yqa0	u62	=  {f% 6fX&5 &"FKFOMr   )NNN)pandasr   pandas_ta._typingr   r   r   pandas_ta.utilsr   r   r	   r   r-   r   r   r   <module>r1      sX     5 5 = = 6::::*2::"*: :r   