MQL4 Reference
Date & Time functions
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);
|
|
|