Quote:
|
Originally Posted by firedave
Hi Babar, try this EA. It's only set two pending order once and if one order filled it deletes the other order (OCO). You could set the EntryLevel if you don't want to use the current price, or set it to 0 (zero) to use the current price (bid). If the order price is too close to current price (less than 10 pips) this EA will reject it. Hope this help 
|
Hello FireDave,
I've been playing with the PendingOrder EA and have been trying to add some Time Constraints into the code. I haven't been successful yet. Anyway, was wondering if you, or any other programmer in the forum, could possibly assist me. What I want to do is add a time value setting into the EA so that it will only open pending orders at a specific time of day. For example, set the EA so that it will only execute pending orders at 6:00 GMT.
The other function I have been trying to figure out is how to add a time value setting into the code so that the open trades initiated by a pending order will automatically close at a specified time, say 18:00 GMT, if it is still open.
I hope I descibed this clearly enough for you.
Thanks