Check the change of Day
BigAl:
has anyone found a easy way to check when the day changes. On MT4 I used the simple code attached. Is there an equally simple way to do it in MT5 please.
has anyone found a easy way to check when the day changes. On MT4 I used the simple code attached. Is there an equally simple way to do it in MT5 please.
You could do something like this . . .
MqlDateTime StrucNow; TimeToStruct(TimeCurrent(), StrucNow); if (StrucNow.day_of_year != OldDayOfYear) { OldDayOfYear = StrucNow.day_of_year; }
just the ticket. thanks
if (DayOfYear() != OldDayOfYear) { OldDayOfYear = DayOfYear();