Check that Pending Orders Exist?
4 replies
JS17
8 years ago #113922
Would the code I have posted below correctly check that the 6 pending orders have been placed?
tomas262
8 years ago #131213
Hi,
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?
JS17
8 years ago #131219
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?
?
tomas262
8 years ago #131233
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)
JS17
8 years ago #131239
thankyou again
Viewing 4 replies - 1 through 4 (of 4 total)