OpenTime.Last().Hour and OpenTime.Last().Minute suddenly stopped returning the correct time, while bots were running, without me changing the code at all
OpenTime.Last().Hour and OpenTime.Last().Minute suddenly stopped returning the correct time, while bots were running, without me changing the code at all
06 Aug 2019, 11:14
What is happening?
Replies
wefald
06 Aug 2019, 11:38
I don't really know what to answer to that, but I'll fill in some more detail:
Two bot instances (of the same bot) returned notification windows with wrong times. One of them was on EURSEK, 5 minute candles, and it was triggered by the OnBar part of the code at 10:20 (using FLEStandardTime) and was meant to show 10:15 in the notification window, corresponding with the last finished candle (OpenTime.Last(1)), but it showed 9:00. The same thing (also showing 9:00) happened with another bot on a different symbol a bit earlier on, but I don't remember the details there.
After a restart, the same instance on the same symbol used the correct time the next time it made a notification window.
I'll keep an eye out for more wrong times.
@wefald
PanagiotisCharalampous
06 Aug 2019, 11:43
Hi wefald,
Can you post the complete cBot code as well as screenshots demomnstrating this issue?
Best Regards,
Panagiotis
@PanagiotisCharalampous
wefald
06 Aug 2019, 11:52
I may have an idea what caused the issue. I was briefly disconnected just after 9:00, while the bots were running, so that 9:00 would be the last time they saw before the disconnect.. It seems like the instances that were started before that disconnect display the mentioned notification error, but instances started later work fine.
I'll monitor and see if that hypothesis is confirmed, and if not, I'll screenshot, send code etc.
@wefald
PanagiotisCharalampous
06 Aug 2019, 11:17
Hi wefald,
Can you guide us on how to reproduce this issue?
Best Regards,
Panagiotis
@PanagiotisCharalampous