Incorrect Time Bars.LastBar.OpenTime

malas7malas since: 08 Dec 2019;

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

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?

PanagiotisCharalampous's avatar

PanagiotisCharalampous since: 13 Jan 2017;

  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

Head of Community Management at cTrader

malas7malas since: 08 Dec 2019;

  13 Jul 2020, 23:27
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.

PanagiotisCharalampous's avatar

PanagiotisCharalampous since: 13 Jan 2017;

  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

Head of Community Management at cTrader

malas7malas since: 08 Dec 2019;

  15 Jul 2020, 15:39
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

PanagiotisCharalampous's avatar

PanagiotisCharalampous since: 13 Jan 2017;

  15 Jul 2020, 15:59

Hi malas7malas,

The time now in Ireland is GMT+1.

Best Regards,

Panagiotis 

Join us on Telegram

Head of Community Management at cTrader