
    i	                         S SK Jr  S SKJrJrJr  S SKJrJr  S SK	J
r
Jr  S SKJrJr  \" SS9S 5       r SS
\S\S\S\S\S\
S\4S jjrg	)    )njit)
empty_likemaximumminimum)	DataFrameSeries)DictLikeInt)v_offsetv_seriesT)cachec                    SX-   U-   U-   -  n[        U5      nSU S   US   -   -  US'   UR                  n[        SU5       H  nSXWS-
     XGS-
     -   -  XW'   M     [        [        XT5      U5      n[	        [	        XT5      U5      n	XXX4$ )Ng      ?g      ?r      )r   sizeranger   r   )
np_opennp_highnp_lownp_closeha_closeha_openmiha_highha_lows
             N/var/www/html/trading/venv/lib/python3.13/site-packages/pandas_ta/candle/ha.pynp_har   
   s    w(61H<=H"G
Xa[01GAJA1a[GENX!e_<=
  gg0':GWW/8FV--    Nopen_highlowcloseoffsetkwargsreturnc                    [        U S5      n [        US5      n[        US5      n[        US5      n[        U5      nU b	  Ub  Ub  Uc  gU R                  5       UR                  5       pvUR                  5       UR                  5       p[        XgX5      u  pp[	        U
UUUS.UR
                  S9nUS:w  a  UR                  U5      nSU;   a  UR                  US   SS9  S	Ul        S
Ul	        U$ )a  Heikin Ashi Candles

Creates Japanese _ohlc_ candlesticks that attempts to filter out market
noise. Developed by Munehisa Homma in the 1700s, Heikin Ashi Candles share
some characteristics with standard candlestick charts but creates a
smoother candlestick appearance.

Sources:
    * [Investopedia](https://www.investopedia.com/terms/h/heikinashi.asp)

Parameters:
    open_ (Series): ```open``` Series
    high (Series): ```high``` Series
    low (Series): ```low``` Series
    close (Series): ```close``` Series
    offset (int): Post shift. Default: ```0```

Other Parameters:
    fillna (value): Replaces ```na```'s with ```value```.

Returns:
    (DataFrame): 4 columns
r   N)HA_openHA_highHA_lowHA_close)indexr   fillnaT)inplacezHeikin-Ashicandle)
r   r   to_numpyr   r   r+   shiftr,   namecategory)r   r    r!   r"   r#   r$   r   r   r   r   r   r   r   r   dfs                  r   har4      s    8 UAED!D
3
CUAEfF}u} ~~'W||~u~~'7H).w)R&Gf		
 [[
B {XXf 6
		&"D	1 BGBKIr   )N)numbar   numpyr   r   r   pandasr   r   pandas_ta._typingr	   r
   pandas_ta.utilsr   r   r   r4    r   r   <module>r;      st     . . $ + . D. ." <<<&,<5;<<"*< <r   