question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with strategy (all)

See original GitHub issue

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?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
hn2commented, Jan 21, 2022

Thank you

1reaction
hn2commented, Jan 20, 2022

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

6 Reasons Your Strategy Isn't Working
Lack of clearly defined and articulated direction — strategy and values — to guide organizational behavior. Conflicting priorities, conflicts ...
Read more >
The Biggest Unsolved Problem In Strategy Execution ... - Forbes
The list of known strategy execution problems is long. But there is a key problem overlooked: ineffective sensemaking. Solving this problem ...
Read more >
Top Seven Struggles We See With Poor Strategy Execution
Only 13% of companies effectively execute on their strategies. We give you a list of the 7 most common strategy execution struggles, and...
Read more >
Top 3 Strategic Problems and How to Address Them
Failure to incorporate the interests of all parties into the strategy ... One of our most useful documents in our strategic planning course...
Read more >
Getting strategy wrong--and how to do it right instead - McKinsey
Given a set of gnarly challenges, three strategic skills can define the path forward. The first is judgment about which issues are truly ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found