Check that Pending Orders Exist?
Would the code I have posted below correctly check that the 6 pending orders have been placed?
yes, the condition seems to be ok but I would also add parentheses right after first AND and also at the end of your condition.
Why do you want to close them if they do NOT exist then?
Tomas, thanks for the reply
I want to close all of the trades, if one of them does not exist.
The EA places 6 trades and sometimes (don’t know why) one trade will be missing so I delete them all and let the EA start again
I have added the parentheses in the file below, is this correct?
Just move opening parenthesis one line higher right after ‘and‘ and then it’s correct. This way you check if one of the conditions is not true (order does not exist)
Viewing 5 posts - 1 through 5 (of 5 total)