Delete Pending order
-
Hello guys,
I have a question on using delete pending order.
I'd like to create a function where EA will delete pending order when certain condition met
For example if MACD above 0, delete the sell pending order and if MACD below 0, delete the buy pending orderhttps://fxdreema.com/shared/yI0C4FiNb
However, when I backtested, the EA is apparently deleting all pending orders.
So, lets say when I put the EA in NZDCAD and its MACD is below 0 level, then all buy pending orders (even not NZDCAD) will be deleted as well. I was expecting only NZDCAD buy pending order to be deleted.I used the function "all automated and manually opened" as below. but whenever I changed it to group #, the EA somehow didnt function properly (does not delete at all).

Could anyone help me out?
Thank you!
-
@andrewfrank This happens because you yourself set up to delete all orders of any group and on any chart. If you want to work only on the graph to which you attack the EA you have to leave these settings as below

-
@ambrogio Thanks for reply.
I also tried this one. but it didnt work properly. it somehow did not delete at all.. -
@andrewfrank please, share your new project
-
@ambrogio here is : https://fxdreema.com/shared/0gn1PJOHc
I tried the EA by open the pending order manually and it did not delete the pending order (when the conditions are met)
Thanks!
-
@andrewfrank these conditions must match


-
@ambrogio ah ok...Thanks!
So I ll use the first one, because I'd use it for pending order both manually and automatically opened.
That should be okay, correct? -
@ambrogio
I tried again with your first suggestion but it did not work for manually opened pending order.
for your suggestion number 2, but it works only for manually opened.Do you know what settings so I can use for both manually and automatically pending order?
-
@andrewfrank the first one is valid for order opened by the expert only on the specified symbol (symbol field is empty, mean you are working on the chart you have attached the EA)
The second one is valid for the order opened manually only, on the same chart as above -
@andrewfrank this one for delete all orders on the chart you have attached the EA (and not on all chart)
by leave the symbol field empty
-
@ambrogio
-Does it mean, would it also work if other EA opened pending order?
I mean, I have a pending order opened by different EA for NZDCAD, and then if I attached this particular EA to close delete pending order for NZDCAD-If I use "all automated and manually opened" and "specified" for symbol mode, would this work?
-
@ambrogio Ok. Thank you! will try with this setting.