MQL4 Reference Date and Time DayOfYear

DayOfYear

Returns the current day of the year (1 means 1 January,..,365(6) does 31 December), i.e., the day of year of the last known server time.

int  DayOfYear();

Returned value

Current day of the year (1 means 1 January,..,365(6) does 31 December).

Note

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

Example:

  if(DayOfYear()==245)
    return(true);