TA-Lib / ta-lib-python

Python wrapper for TA-Lib (http://ta-lib.org/).
http://ta-lib.github.io/ta-lib-python
Other
9.8k stars 1.78k forks source link

ValueError with 4-hour data, but not 1-hour data #578

Open toncorp opened 1 year ago

toncorp commented 1 year ago

As title states, I'm getting a ValueError when I run my code with 4-hour data, but not with 1-hour data. I'm using CSVs. 1-hour data runs perfectly as expected. However, when I export data in exactly the same way, just changing the time interval to 4-hour, I get this warning: "FutureWarning: reindexing with a non-unique Index is deprecated and will raise in a future version" which I don't get when I run the code with the 1-hour data, and then I get this error: "ValueError: cannot reindex on an axis with duplicate labels". The error is originating with df.ta.macd(append=True), however when I comment it out, it just throws the same error with a new line, in my case df.ta.msi(append=True).

Any ideas what's causing the error to occur with 4-hour data, but not 1-hour?

mrjbq7 commented 1 year ago

What is df.ta?

On Sun, Feb 5, 2023 at 6:35 PM toncorp @.***> wrote:

As title states, I'm getting a ValueError when I run my code with 4-hour data, but not with 1-hour data. I'm using CSVs. 1-hour data runs perfectly as expected. However, when I export data in exactly the same way, just changing the time interval to 4-hour, I get this warning: "FutureWarning: reindexing with a non-unique Index is deprecated and will raise in a future version" which I don't get when I run the code with the 1-hour data, and then I get this error: "ValueError: cannot reindex on an axis with duplicate labels". The error is originating with df.ta.macd(append=True), however when I comment it out, it just throws the same error with a new line, in my case df.ta.msi(append=True).

Any ideas what's causing the error to occur with 4-hour data, but not 1-hour?

— Reply to this email directly, view it on GitHub https://github.com/TA-Lib/ta-lib-python/issues/578, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAF5A7UF35C6O2VVQTKHL3WWBPOFANCNFSM6AAAAAAUSEQBHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

mrjbq7 commented 1 year ago

This project doesn't add a ta method to data frames.

Are you using a custom wrapper? Or using a different project?

We also don't have an MSI indicator?