MQL4参考 日期和时间 Year
Returns the current year, i.e., the year of the last known server time.
At the testing, the last known server time is modelled.
// return if the date is within the range from 1 Jan. to 30 Apr., 2006.
if(Year()==2006 && Month()<5)