MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Date & Time functions  Hour

 
Use the opportunities of
MQL5 in MetaTrader 5
Study the new MQL5 language
Study the new MQL5 language.
Reference is already available
int Hour( )
Returns the hour (0,1,2,..23) of the last known server time by the moment of the program start (this value will not change within the time of the program execution).
Note: At the testing, the last known server time is modelled.
Sample:
  bool is_siesta=false;
  if(Hour()>=12 || Hour()<17)
     is_siesta=true;