MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Date & Time functions  Year

 
Use the opportunities of
MQL5 in MetaTrader 5
Study the new MQL5 language
Study the new MQL5 language.
Reference is already available
int Year( )
Returns the current year, i.e., the year of the last known server time.
Note: At the testing, the last known server time is modelled.
Sample:
  // return if the date is within the range from 1 Jan. to 30 Apr., 2006.
    if(Year()==2006 && Month()<5)
    return(0);