This forum is in read-only mode now. You may discuss your questions on forums of MQL4.community and MQL5.community

Close trades at end of week code ?


Back to topics list
avatar
100
mpfx 2005.04.30 00:41 
I am trying to write a code that will close all trades out in the last 10 min of the week.
Is this code correct

exit = (Minute()==50 && Hour()==22 && DayOfWeek()==5);

Thanks
avatar
19
steve_zhang8 2005.05.01 21:02 
In a reverse way could be more efficient.
exit = ( DayOfWeek()==5 && Hour()==22 && Minute()==50);
avatar
100
mpfx 2005.05.02 00:20 
Thanks steve_zhang8
I will try it.....
Back to topics list  
Download MetaTrader 5 (450 Kb, web installer) — a new terminal for financial markets