Candle GMT offset

 

It really frustrates me that the MQL4, does not provide a way to get the GMT offset from a specific candle in the past.

I'm writing an indicator which needs to draw a vertical line on the chart when the broker timezone has been changed.

How I can do this ?

Please guys, if anyone out there has a solution, please share it.

Thank you and much appreciated!

 

You can calculate by yourself!

You have (local) TimeGMT() and  CurrentTime() this way you get time offset of the Server to GMT (if the clock of your pc ist set correctly!!) - and if this changes..

 
Carl Schreiber:

You can calculate by yourself!

You have (local) TimeGMT() and  CurrentTime() this way you get time offset of the Server to GMT (if the clock of your pc ist set correctly!!) - and if this changes..


This way I think you will get the current GMT offset. I need to see what was the GMT offset 5 months ago let say. 

 

MQL4/5 developers , please help, I need it.

 

Isn't that just the same as the time 5 months ago including that correction?

 
Marco vd Heijden:

Isn't that just the same as the time 5 months ago including that correction?


Hi, what do you mean?

How it can be the same if let say 4 month ago the broker changed its time zone from +2 to +1 ?

 
Tzvetan Jordanov:

This way I think you will get the current GMT offset. I need to see what was the GMT offset 5 months ago let say. 

If your broker follows the normal fx-session open time it opens Sunday 17:00 NY-time. Therefore NT_Open_Time - NY_DST - NY_GMT_Offset  should give you GMT_Offset of your quotes.

Make a list when the NY_DST changes, see here for example: https://www.timeanddate.com/time/change/usa/washington-dc

 
Carl Schreiber:

If your broker follows the normal fx-session open time it opens Sunday 17:00 NY-time. Therefore NT_Open_Time - NY_DST - NY_GMT_Offset  should give you GMT_Offset of your quotes.

Make a list when the NY_DST changes, see here for example: https://www.timeanddate.com/time/change/usa/washington-dc


Thank you for your reply Carl.

What I'm looking for is this little peace of code which takes the GMT offset from a candle in the past.

Can you write an example following your explanation above ?

Thanks and much appreciated !

 
I haven't it coded yet, so I am sorry.
 
Carl Schreiber:
I haven't it coded yet, so I am sorry.

Yes I think it will be difficult to be coded tho :)

 

Come on guys, help please.

Is it impossible ?