Incorrect Time Bars.LastBar.OpenTime

Created at 10 Jul 2020, 19:03
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!
MA

malas7malas

Joined 08.12.2019

Incorrect Time Bars.LastBar.OpenTime
10 Jul 2020, 19:03


Hi Support

I'm getting incorrect time when I'm using Bars.LastBar.OpenTime.

My PC time matches cTrader time and chart shows correct time and I have set correct time zone

[Indicator(IsOverlay = false, TimeZone = TimeZones.GreenwichStandardTime, AccessRights = AccessRights.None)]

But as you can see in the screenshot below Print output does not match my current time

Print(Bars.LastBar.OpenTime);

Can you please advice if I'm missing something or what is the issue?


@malas7malas
Replies

PanagiotisCharalampous
13 Jul 2020, 09:19

Hi malas7malas,

Seems correct to me. Greenwich Mean Time is the same as UTC time.

Best Regards,

Panagiotis 

Join us on Telegram

 


@PanagiotisCharalampous

malas7malas
13 Jul 2020, 23:27 ( Updated at: 21 Dec 2023, 09:22 )

RE:

PanagiotisCharalampous said:

Hi malas7malas,

Seems correct to me. Greenwich Mean Time is the same as UTC time.

Best Regards,

Panagiotis 

Join us on Telegram

 

HI Panagiotis

No it's not correct.

My computer time is Greenwich (UTC)

If you look in the screenshot my computer time is 16:56 (second screenshot) and if I run command Print(Bars.LastBar.OpenTime) on the cBot with the timeframe set to 5 minutes, the output is 15:55 and it should be 16:55,  because last bar was opened a minutes ago and not one hour and 1 minute ago, therefore the output time is incorrect.

 

 

 


@malas7malas

PanagiotisCharalampous
14 Jul 2020, 08:32

Hi malas7malas,

Your cTrader timezone is set to UTC+1. Your cBot is set to Greenwich Mean Time. As mentioned above, Greenwich Mean Time is the same as UTC time. The time is correct.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

malas7malas
15 Jul 2020, 15:39 ( Updated at: 21 Dec 2023, 09:22 )

RE:

PanagiotisCharalampous said:

Hi malas7malas,

Your cTrader timezone is set to UTC+1. Your cBot is set to Greenwich Mean Time. As mentioned above, Greenwich Mean Time is the same as UTC time. The time is correct.

Best Regards,

Panagiotis 

Join us on Telegram

Hi Panagiotis

If I change to UTC+0 (which my time is UTC+0 Irish time)  then the time does not match with my computer time.

Is this because we're on summer time?

Is there anything can be changed?

See the screenshot below


@malas7malas

PanagiotisCharalampous
15 Jul 2020, 15:59 ( Updated at: 21 Dec 2023, 09:22 )

Hi malas7malas,

The time now in Ireland is GMT+1.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous