
    'i	                     >    d dl mZmZmZmZ ddlmZ  G d de      Zy)    )absolute_importdivisionprint_functionunicode_literals   )RSIc                   B    e Zd ZdZdZdZ e ed            ZdZd Z	y	)
RelativeMomentumIndexat  
    Description:
    The Relative Momentum Index was developed by Roger Altman and was
    introduced in his article in the February, 1993 issue of Technical Analysis
    of Stocks & Commodities magazine.

    While your typical RSI counts up and down days from close to close, the
    Relative Momentum Index counts up and down days from the close relative to
    a close x number of days ago. The result is an RSI that is a bit smoother.

    Usage:
    Use in the same way you would any other RSI . There are overbought and
    oversold zones, and can also be used for divergence and trend analysis.

    See:
      - https://www.marketvolume.com/technicalanalysis/relativemomentumindex.asp
      - https://www.tradingview.com/script/UCm7fIvk-FREE-INDICATOR-Relative-Momentum-Index-RMI/
      - https://www.prorealcode.com/prorealtime-indicators/relative-momentum-index-rmi/

    )RMI))rsirmir   )_name)r   ))period   )lookback   c                     | j                   j                  g}|| j                   j                  gz  }|| j                   j                  g| j                   j	                  d      z  z  }|S )Nmovav)pr   r   r   
notdefault)selfplabelss     W/var/www/app/trading-bot/venv/lib/python3.12/site-packages/backtrader/indicators/rmi.py
_plotlabelz RelativeMomentumIndex._plotlabel:   sS    66==/DFFOO$$DFFLL>DFF$5$5g$>>>    N)
__name__
__module____qualname____doc__alias	linealiasdict	plotlinesparamsr    r   r   r
   r
      s.    ( E"IE*+IF
r   r
   N)
__future__r   r   r   r    r   r
   r%   r   r   <module>r(      s    ** * $C $r   