Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

abstract function is missing required data key: close, while the "price" is not set to "close" #40

Closed
chinux23 opened this issue Jul 1, 2013 · 1 comment

Comments

@chinux23
Copy link

chinux23 commented Jul 1, 2013

    from talib import abstract   
    input_arrays2 = {
        'SMA10': np.random.random(100)
        }

    SMA30_of_SMA10 = abstract.SMA(input_arrays2, timeperiod=30, price="SMA10")

will generate an error:

---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-4-db3780d50e5c> in <module>()
----> 1 SMA30_of_SMA10 = abstract.SMA({"SMA10": input_arrays2}, timeperiod=30, price="SMA10")

/Users/chen/Virtualenvs/python3Env/lib/python3.3/site-packages/talib/abstract.so in talib.abstract.Function.__call__ (talib/abstract.c:5799)()

/Users/chen/Virtualenvs/python3Env/lib/python3.3/site-packages/talib/abstract.so in talib.abstract.Function.set_function_args (talib/abstract.c:4604)()

/Users/chen/Virtualenvs/python3Env/lib/python3.3/site-packages/talib/abstract.so in talib.abstract.Function.set_input_arrays (talib/abstract.c:4009)()

Exception: input_arrays parameter missing required data key: close

Is this expected behavior?

System Info:
Panadas version: 0.11.0
Numpy version: 1.7.1
Matplotlib version: 1.2.1
Python version: 3.3.1 (default, May 12 2013, 21:14:39)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)]
talib version: 0.4.7

ta-lib installed on the system is 0.4.0

briancappello added a commit to briancappello/ta-lib that referenced this issue Jul 1, 2013
mrjbq7 added a commit that referenced this issue Jul 1, 2013
@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 1, 2013

This should be fixed now if you want to try with an updated git checkout. Thanks @briancappello!

@mrjbq7 mrjbq7 closed this as completed Jul 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants