Pending Order Won't Delete
-
I have a rule set to delete the last remaining pending order when the previous order hits take profit.
When I back test this it works fine, but when I run the EA on live or demo accounts the 2nd pending order does not delete. There is no information about why it's not working in the Journal either.
I have tried two ways:
- Check for previous trade closed in profit
- Check for previous trade that hit Take Profit
Here's an example of both methods:
https://fxdreema.com/shared/BctNzz83bAny help much appreciated!
Cheers
-
"AND" block is not needed.
You have "Delete pending orders" set to delete all pending orders with magic number 1412 (MagicStart+Group). I don't know where your pending orders comes from, probably another EA. In any case, make sure that magic numbers match.
Here is a simple example of creating multiple pending orders and then delete them using "Delete pending orders":
https://fxdreema.com/shared/okJGnBp8e
It works for me:
http://img.prntscr.com/img?url=http://i.imgur.com/GChz1bF.png -
Thanks.
Where can I change the MagicStart number? I can't see it in any of the boxes?
Will also try and update the EA using your suggestions to see if that helps.
Cheers
-
Click on the bench icon on the lower right corner. Also, this is an input parameter that exists for all EAs.
-
Thanks, these changes fixed it!