-
Notifications
You must be signed in to change notification settings - Fork 653
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
Missfit of tlines #425
Comments
Can you please, after df.to_csv('AMC_20210722_20210728.csv') ... and then post the csv file here, or put it somewhere that I can get to it (or email to [email protected]) so that I can be sure I am working with the exact same data you are working with. I will take a look. Thank you. --Daniel |
Thanks for the quick response. I have linked to a zip-folder with the csv file in it. |
This is indeed a bug that was reported previously here. The explaination is as follows: Whenever plotting a time series with matplotlib, the datetimes must be converted to low-level matplotlib dates. Mplfinance does this for you. Normally this works fine, but when your dataframe's datetime index contains a timezone offset. matplotlib's date conversion always converts the time zone to UTC. (I'm not sure why matplotlib does that). In order to avoid this automatic conversion to UTC, mplfinance detects if a timezone offset is present in the dataframe index, and if so, then it "localizes" the pandas Timestamp objects. This generally works fine. The bug is this: when I added code to localize the pandas Timestamps, (See issue #236), I forgot to add code to also localize any datetimes passed in as This will definitely be fixed eventually. In the meantime there are a couple of workarounds that you can try:
|
Thank you so much for the help. This works perfektly 👍 |
I may have done something wrong but this may also be a bug.
I have data from yahoofinance of the ticker symbol AMC from (2021-07-22 09:30:00-04:00 to 2021-07-28 15:59:00-04:00). I want to use the function tlines() but I get something that is not suppose to happen.
Code:
My problem is that the fit is wrong how do I fix this?
The text was updated successfully, but these errors were encountered: