
    i                         S SK Jr  S SKJrJr  S SKJrJr  S SKJ	r	  / SQr
\ " S S5      5       r\" SS	S
S9r\" SSS SSS.SSS.SSS.SSS.SSSSS./S9rg
)    )	cpu_count)	dataclassfield)IntList)get_time)StudyAllStudyCommonStudyc                       \ rS rSr% Sr\\S'   \" \S9r	\
\S'   \" 5       r\\S'   Sr\\S'   \" S	S
9r\\S'   S rS rS rS rSrg)r	      a  Study DataClass
Class to name and group indicators for processing.

Parameters:
    name (str): Name.
    ta (list of dicts): i.e [{"kind": "ema", "length", 50}]
    cores (int): The number cores to use for multiprocessing.
        Default: ```cpu_count()```
    description (str): Description of what the Study. Default: ```""```
    created (str): DateTime String at creation.
        Default: Automatically generated.

Returns:
    (DataClass): The Study to be processed by ```df.ta.study()```

Example: All or Common Study
    Run
    ```py
    # Run "All"
    df.ta.study(ta.AllStudy, **kwargs)

    # Run "Common"
    df.ta.study(ta.CommonStudy, **kwargs)
    ```

Example: Custom Study
    Create
    ```py
    DemoStudy = ta.Study(
        name="Demo Study",
        description="Example Study Group",
        cores=0,  # Usually faster than multiprocessing
        ta = [
            {"kind": "sma", "length": 200},
            {"kind": "sma", "close": "volume", "length": 50},
            {"kind": "bbands", "length": 20},
            {"kind": "rsi"},
            {"kind": "macd", "fast": 8, "slow": 21},
            {"kind": "sma", "close": "volume", "length": 20, "prefix": "VOLUME"}
        ]
    ```

    Run
    ```py
    df.ta.study(DemoStudy, **kwargs)
    ```

Note:
    * See [also](../getting-started/usage.md) the Pandas TA
      "Study" Examples
    * Case-insensitive "All" is reserved.

Warning: Multiprocessing
    **Not recommended** for:

    * Small sets of indicators
    * Indicator chains
name)default_factorytacores descriptionT)	to_stringcreatedc                    [        U R                  [        5      (       aB  U R                  S:  a2  U R                  [        5       ::  a  [        U R                  5      U l        S/nU R	                  5       (       a  UR                  S5        U R                  c  S U l        O-U R                  5       (       d  SnUS-  nUR                  U5        [        U5      S:  a  U Vs/ s H  n[        U5      PM       ng g s  snf )Nr   z-[X] Study requires the following argument(s):zE - name. Must be a string. Example: "My TA". Note: "all" is reserved.zJ - ta. Format is a list of dicts. Example: [{'kind': 'sma', 'length': 10}]zP
       Check the indicator for the correct arguments if you receive this error.   )

isinstancer   intr   _is_nameappendr   _is_talenprint)selfreq_argss_s       Q/var/www/html/trading/venv/lib/python3.13/site-packages/pandas_ta/utils/_study.py__post_init__Study.__post_init__T   s    djj#&&4::?tzzY[?XTZZDJCD==??OOWY 77?DG\AddAOOAx=1'(x!U1Xx( (s    C9c                 j    U R                   S L =(       d    [        U R                   [        5      (       + $ )N)r   r   strr   s    r#   r   Study._is_namej   s$    yyD B
499c(B$BB    c           	      "   [        U R                  [        5      (       ak  U R                  5       S:  aW  [	        U R                   Vs/ s H6  n[        U[
        5      =(       a    [        UR                  5       5      S:  PM8     sn5      $ gs  snf )Nr   F)r   r   listtotal_taalldictr   keys)r   r"   s     r#   r   Study._is_tan   sg    dggt$$1)< 477S7a
1d+AAFFH0AA7STT Ts   =Bc                 J    U R                   b  [        U R                   5      $ S$ )Nr   )r   r   r(   s    r#   r-   Study.total_tax   s    #ww2s477|99r*   )r   r   N)__name__
__module____qualname____firstlineno____doc__r'   __annotations__r   r,   r   r   r   r   r   r   r   r   r$   r   r   r-   __static_attributes__ r*   r#   r	   r	      sX    9t IT*B*+E3Kd+GS+,C:r*   r	   AllzBAll the indicators with their default settings. Pandas TA default.N)r   r   r   zCommon Price and Volume SMAsz6Common Price SMAs: 10, 20, 50, 200 and Volume SMA: 20.sma
   )kindlength   2      volumeVOL)r?   closer@   prefix)r   r   r   r   )multiprocessingr   dataclassesr   r   pandas_ta._typingr   r   pandas_ta.utils._timer   __all__r	   r
   r   r;   r*   r#   <module>rM      s    % ( ' * g: g: g:X 	T 	'H
"%"%"%#&R5I	r*   