Download MetaTrader 5
To add comments, please log in or register
Make screenshots in MetaTrader and manage them in the gallery!
Sherif Hasan
7223
Sherif Hasan 2015.06.09 11:20 

I want to display GMT time on chart.

i used Comment(TimeGMT());

shows error!

Please advise me how to use TimeGMT() function?

whroeder1
13627
whroeder1 2015.06.09 12: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() ) );





Sherif Hasan
7223
Sherif Hasan 2015.06.09 13: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



/
To add comments, please log in or register