-
Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
Messages Editor -
Perhaps you should read the manual. DayOfWeek takes no paremeter. TimeDayOfWeek does.
How To Ask Questions The Smart Way. (2004)
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up. Don't hard code constants.
Use the proper enumerations (ENUM_DAY_OF_WEEK)if (dayOfWeek == FRIDAY) // 5 is for Friday
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi Experts,
i need help. i want my ea to stop trade on friday.
I use the dayofweek function. below is my code,
int dayOfWeek = DayOfWeek(TimeCurrent());
if (dayOfWeek == 5) // 5 is for Friday
{
return (0);
}
But the mql compiler stated error message "DayOfWeek' - wrong parameters count" can someone provide some advise how to fix it ? thanks