I looked at this link allready, but as a non -professional, only stupid trader, I need an example, which is closer to my needs.
An expression just for one day in the week.
I looked at this link allready, but as a non -professional, only stupid trader, I need an example, which is closer to my needs.
An expression just for one day in the week.
MQL5=>MQL4 conversion functions are here https://www.mql5.com/en/forum/121011/page18
In mt4datetime.mqh:
int DayOfWeek()
{
MqlDateTime tm;
TimeCurrent(tm);
return(tm.day_of_week);
}
Paul
- www.mql5.com
MQL5=>MQL4 conversion functions are here https://www.mql5.com/en/forum/121011/page18
In mt4datetime.mqh:
Paul
When I understand corrctly this means: I can use the old expression, with
#include <mt4datetime.mqh>
Compiler shows no errors.
Hope it works
Thanks.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
For a pivot indicator I need an expression to find Monday.
In MQL4 code
if (DayOfWeek() == 1) ...
How do you code an expression to find the first day of the week in MQL5?
Can you give an example?