Confused with using TimeGMT()?

Back to topics list To post a new topic, please log in or register
avatar
273
sheriffonline 2015.06.09 13:20
 

I want to display GMT time on chart.

i used Comment(TimeGMT());

shows error!

Please advise me how to use TimeGMT() function?


avatar
12985
WHRoeder 2015.06.09 14:10 #
 

It is not showing an error. It is doing exactly what it is supposed to do. Read the documentation. What's New in MQL4 - MQL4 Documentation Feb 2014

The string representation of datetime type depends on compilation mode:

  datetime date=D'2014.03.05 15:46:58';
  string str="mydate="+date;
//--- str="mydate=1394034418" - old compiler/new compiler without #property strict
//--- str="mydate=2014.03.05 15:46:58" - new compiler with #property strict
Comment( TimeToString( TimeGMT() ) );





avatar
273
sheriffonline 2015.06.09 15:24 #
 
WHRoeder:

It is not showing an error. It is doing exactly what it is supposed to do. Read the documentation. What's New in MQL4 - MQL4 Documentation Feb 2014





WHRoeder:

It is not showing an error. It is doing exactly what it is supposed to do. Read the documentation. What's New in MQL4 - MQL4 Documentation Feb 2014


Oops. Yes. i am using old compiler. now it works for me , no errors with new compiler




Back to topics list  

To add comments, please log in or register