I guess you are trying to avoid opening an order during the last 4 hours of Friday. If this is the case you could do something like:
- get the current brokerage time with https://docs.mql4.com/dateandtime/TimeCurrent
- check if it is Friday with https://docs.mql4.com/dateandtime/TimeDayOfWeek
- if so then check if it is after 19:00 - use https://docs.mql4.com/dateandtime/TimeHour to get the hour
- and if this is true as well, then skip opening trades...
sounds long to describe it, but it is actually just 1 line of code...
You may want to do a search, I am pretty sure this question has been asked and answered before...
- get the current brokerage time with https://docs.mql4.com/dateandtime/TimeCurrent
- check if it is Friday with https://docs.mql4.com/dateandtime/TimeDayOfWeek
- if so then check if it is after 19:00 - use https://docs.mql4.com/dateandtime/TimeHour to get the hour
- and if this is true as well, then skip opening trades...
sounds long to describe it, but it is actually just 1 line of code...
You may want to do a search, I am pretty sure this question has been asked and answered before...
thank you
Automated
--
grid trading EA, +558 pips in 24 hours:
http://grid9.forexmosaic.com/ - 8621 pips in 7 weeks of grid trading

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 guys.....
somebody of u have tried to insert the conditions that permit to envy opening order in particular days or hours??
i would need to envy to open order in the last 4 hours in the friday( FOR ITALY 19.00 - 23.00 ) . sometimes there is a big gap in the sunday opening ....so...i 'd like to envy problems... :-))
how can i do??
thanks in advance for your helpul :-)))