MQL4 Reference Date and Time Month

MQL4 Help as One File:

Month

Returns the current month as number (1-January,2,3,4,5,6,7,8,9,10,11,12), i.e., the number of month of the last known server time.

int  Month();

Returned value

Returns the current month as number (1-January,2,3,4,5,6,7,8,9,10,11,12), i.e., the number of month of the last known server time.

Note

At the testing, the last known server time is modelled.

Example:

  if(Month()<=5)
    return("the first half year");