You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I tried to implement the tlines using mplfinance, and generate the trendline data as per the example, however, I still get this error:
ValueError:
tlines date pair (2021-01-11 09:35:00-05:00,2021-01-11 10:20:00-05:00) too close, or wrong order, or out of range!
df date range: [2021-01-11 09:35:00+00:00 , 2021-01-11 10:20:00+00:00]
Please, if anyone can advise, It will be much appreciated.
Regards.
The text was updated successfully, but these errors were encountered:
I'm guessing the problem is that you have different timezone information in your tlines datetimes compared with your DataFrame DatetimeIndex, and so it thinks that the times you specified with tlines are outside of the range of the DatetimeIndex in your DataFrame.
If the above is not enough information to solve your problem, then please post your data (csv file), and your code, so that I can try to reproduce this.
Hi Daniel, Thanx for the quick response, I have sent an email with the csv and code.
Got it. I will try to make time to look into this today. I suspect that it may have something to do with the fix for this timezone bug.
In the meantime, until I get a chance to look at this, please try adding kwarg tz_localize=False to your call to mpf.plolt() and let me know if that fixes the problem. Thanks.
DanielGoldfarb
changed the title
Value Error When Using tline tz_localize=True fails to localize datetimes in tlines and alines specifications (and in the future also in xlim specification?)
Jan 12, 2021
Hi, I tried to implement the tlines using mplfinance, and generate the trendline data as per the example, however, I still get this error:
ValueError:
tlines date pair (2021-01-11 09:35:00-05:00,2021-01-11 10:20:00-05:00) too close, or wrong order, or out of range!
df date range: [2021-01-11 09:35:00+00:00 , 2021-01-11 10:20:00+00:00]
Please, if anyone can advise, It will be much appreciated.
Regards.
The text was updated successfully, but these errors were encountered: