MQL4 - automated forex trading   /  

Forum

time to open order

Back to topics list To post a new topic, please log in or register

avatar
51
giulioron 2010.04.16 16:23 

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 :-)))

Requirements Applicable to Articles Offered for Publishing at MQL4.com

Requirements Applicable to Articles Offered for Publishing at MQL4.com

Requirements Applicable to Articles Offered for Publishing at MQL4.com


avatar
81
Automated 2010.04.16 16:36 
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 http://docs.mql4.com/dateandtime/TimeCurrent

- check if it is Friday with http://docs.mql4.com/dateandtime/TimeDayOfWeek

- if so then check if it is after 19:00 - use http://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








Back to topics list  

To add comments, please log in or register