ta-lib-python icon indicating copy to clipboard operation
ta-lib-python copied to clipboard

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

Open toncorp opened this issue 2 years ago • 2 comments

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?

toncorp avatar Feb 06 '23 02:02 toncorp

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 avatar Feb 06 '23 02:02 mrjbq7

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?

mrjbq7 avatar Feb 07 '23 05:02 mrjbq7