
    'i                     L    d dl mZmZmZmZ ddlmZmZmZ dgZ	 G d de      Z
y)    )absolute_importdivisionprint_functionunicode_literals   )	IndicatorSMAPercentRankDV2c                   4     e Zd ZdZdddeffZdZ fdZ xZS )r   a  
    RSI(2) alternative
    Developed by David Varadi of http://cssanalytics.wordpress.com/

    This seems to be the *Bounded* version.

    See also:

      - http://web.archive.org/web/20131216100741/http://quantingdutchman.wordpress.com/2010/08/06/dv2-indicator-for-amibroker/

    )period   )maperiod   _movav)dv2c                    | j                   j                  | j                   j                  | j                   j                  z   dz  z  }| j                  j                  || j                  j                        }t        || j                  j                        dz  | j                  _
        t        t        | 7          y )Ng       @)r   d   )dataclosehighlowpr   r   r
   r   linesr   superr   __init__)selfchldvu	__class__s      W/var/www/app/trading-bot/venv/lib/python3.12/site-packages/backtrader/indicators/dv2.pyr   zDV2.__init__2   sy    iioo$))..499=="@C!GHffmmCm8$S?#E

c4!#    )	__name__
__module____qualname____doc__r	   paramsr   r   __classcell__)r    s   @r!   r   r      s/    
 		3F
 E$ $r"   N)
__future__r   r   r   r    r   r	   r
   __all__r    r"   r!   <module>r-      s,   ** * * ) '$) $r"   