I conducted a test (and posted the results in response to WHRoeder post you cited above) which seems to show that DayOfWeek() now works correctly in the Tester. See https://www.mql5.com/en/forum/144021. Just now, I took the same code from my test--
int day_of_week = 0;
int start() {
if (day_of_week != DayOfWeek()) {
Print ("DayOfWeek is ", DayOfWeek());
day_of_week = DayOfWeek();
}
return (0);
}
and ran it against the same date range (07/01/2013 to 08/03/2013) in the Tester, and it produced the following results in the journal/log:
As one can see, DayOfWeek() appears to work correctly in the Tester.
Thirteen: I conducted a test (and posted the results in response to WHRoeder post you cited above) which seems to show that DayOfWeek() now works correctly in the Tester.
We both reported that as 'may.' We had not tested it, three years ago or the current version. It may work fine in a EA and fail in a indicator.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Third, if I may ask, why are you using TimeDayOfWeek() rather than DayOfWeek()?
DayOfWeek() may well have issues in the Strategy Tester . . https://www.mql5.com/en/forum/144021
I conducted a test (and posted the results in response to WHRoeder post you cited above) which seems to show that DayOfWeek() now works correctly in the Tester. See https://www.mql5.com/en/forum/144021. Just now, I took the same code from my test--
and ran it against the same date range (07/01/2013 to 08/03/2013) in the Tester, and it produced the following results in the journal/log:
As one can see, DayOfWeek() appears to work correctly in the Tester.
We both reported that as 'may.' We had not tested it, three years ago or the current version. It may work fine in a EA and fail in a indicator.