pandas-ta: Problem with strategy (all)

Which version are you running? The lastest version is on Github. Pip is for major releases.

import pandas_ta as ta
print(ta.version)

0.3.14b0

Do you have TA Lib also installed in your environment?

$ pip list

Yes TA-Lib 0.4.17

Upgrade.

$ pip install -U git+https://github.com/twopirllc/pandas-ta

Describe the bug When trying to add all indicators (ta.AllStrategy) to my dataframe I get:

Traceback (most recent call last):
  File "C:\Users\hanna\Anaconda3\lib\multiprocessing\pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "C:\Users\hanna\Anaconda3\lib\multiprocessing\pool.py", line 44, in mapstar
    return list(map(*args))
  File "C:\Users\hanna\Anaconda3\lib\site-packages\pandas_ta\core.py", line 467, in _mp_worker
    return getattr(self, method)(*args, **kwargs)
  File "C:\Users\hanna\Anaconda3\lib\site-packages\pandas_ta\core.py", line 874, in cdl_pattern
    result = cdl_pattern(open_=open_, high=high, low=low, close=close, name=name, offset=offset, **kwargs)
  File "C:\Users\hanna\Anaconda3\lib\site-packages\pandas_ta\candles\cdl_pattern.py", line 64, in cdl_pattern
    pattern_result = Series(pattern_func(open_, high, low, close, **kwargs) / 100 * scalar)
  File "_abstract.pxi", line 352, in talib._ta_lib.Function.__call__
  File "_abstract.pxi", line 383, in talib._ta_lib.Function.__call_function
  File "C:\Users\hanna\Anaconda3\lib\site-packages\talib\__init__.py", line 24, in wrapper
    return func(*args, **kwargs)

TypeError: Argument 'open' has incorrect type (expected numpy.ndarray, got NoneType)

As you can see it is probably due to cdl_pattern error.

When I switch to ta.CommonStrategy I get:

Index([‘open’, ‘high’, ‘low’, ‘close’, ‘volume’, ‘SMA_10’, ‘SMA_20’, ‘SMA_50’, ‘SMA_200’, ‘VOL_SMA_20’],

I get 6 indicators(sma) added to my dataframe. Is this the expected behavior? Only 6 common indicators?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 26 (11 by maintainers)

Most upvoted comments

Thank you

image

image