MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Date & Time functions  TimeCurrent

 
Use the opportunities of
MQL5 in MetaTrader 5
Study the new MQL5 language
Study the new MQL5 language.
Reference is already available
datetime TimeCurrent( )
Returns the last known server time (time of incoming of the latest quote) as number of seconds elapsed from 00:00 January 1, 1970.

Note: At the testing, the last known server time is modelled.
Sample:
  if(TimeCurrent()-OrderOpenTime()<360) return(0);