
    Q-j                     r    d dl mZ d dlmZmZ d dlmZmZmZ ddl	m	Z	 ddl
m
Z
 	 	 dded	ed
edededefdZy)    )Series)DictLikeInt)v_offsetv_pos_defaultv_series   )
decreasing)
increasingNfastslowlengthoffsetkwargsreturnc                 N   t        |d      }t        | |      } t        ||      }| |yt        |      }t        | |      }|t	        ||      z  }|t        ||      z  }||z  }|dk7  r|j                  |      }d|v r|j                  |d   d       d| |_        d|_        |S )	aY  Long Run

    This indicator, by Kevin Johnson, attempts to identify long runs.

    Sources:
        * Kevin Johnson
        * [tradingview](https://www.tradingview.com/script/Z2mq63fE-Trade-Archer-Moving-Averages-v1-4F/)

    Parameters:
        fast (Series): ```fast``` Series.
        slow (Series): ```slow``` Series.
        length (int): The ```decreasing``` and ```increasing``` period.
            Default: ```2```
        offset (int): Post shift. Default: ```0```

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

    Returns:
        (Series): 1 column
       Nr   fillnaT)inplaceLR_trend)	r   r   r   r   r
   shiftr   namecategory)	r   r   r   r   r   incpbbilong_runs	            f/Users/jameslopez/projects/TradingBot25/.venv/lib/python3.12/site-packages/pandas_ta/trend/long_run.pyr   r   
   s    4 61%FD&!DD&!D|t|fF T6
"C 
z$'	'B	z$'	'BBwH {>>&) 6x($7 &NHMHO    )NN)pandasr   pandas_ta._typingr   r   pandas_ta.utilsr   r   r   r
   r   r    r    r   <module>r%      sV     + = = " "
 /38
88(+88"*8 8r    