OpenTime.Last().Hour and OpenTime.Last().Minute suddenly stopped returning the correct time, while bots were running, without me changing the code at all

Created at 06 Aug 2019, 11:14
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
WE

wefald

Joined 01.11.2018

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?


@wefald
Replies

PanagiotisCharalampous
06 Aug 2019, 11:17

Hi wefald,

Can you guide us on how to reproduce this issue?

Best Regards,

Panagiotis


@PanagiotisCharalampous

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

wefald
06 Aug 2019, 11:41

It just happened again, this very minute. 

Now on WTI, 5 minute candles. The notification window shows 9:00 when it should have shown 11:35.


@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