
    i]                    &    d Z ddlmZ ddlZdddZy)u<   RSI (Wilder, rolling-mean smoothing) — port fedele da V15.    )annotationsNc                   | d   j                         }|j                  |dkD  d      j                  |      j                         }|j                  |dk  d       j                  |      j                         }ddd||dz   z  z   z  z
  S )z
    RSI on `df['close']` using rolling-mean smoothing (V14/V15 convention).

    Returns the full series so callers can read iloc[-1] (current) and
    iloc[-2] (previous) for `rsi`/`rsi_prev`.
    closer   d      g&.>)diffwhererollingmean)dfperioddeltagainlosss        ./home/work/apex_v16/analysis/indicators/rsi.pycalc_rsir      s     wKE;;uqy!$,,V499;D[[A&&//7<<>D#TTD[11233    )   )r   zpd.DataFramer   intreturnz	pd.Series)__doc__
__future__r   pandaspdr    r   r   <module>r      s    B " 
4r   