make EA close all pending orders after Tp triggered
-
hi , i made a simple martingale ea and i can't figure out a way to make the ea close all pending orders after one successful order hits it's Take Profit , i am new to the site, glad for your help.

-
-
Thank you , but it seems not to be working , i tried to connect it in two different ways and both didn't work, i don't know what's wrong !


-
it has to be on-Trade event not on-Tick event. Show me a full screen
-

when i tried it ( on trade ) it doesn't place any orders, just shows the ea is working , and i checked my trades nothing wrong with them
-
and i tried leaving the block " Trade Closed " not connected to the others, same result.
-
Part of it needs to be on-Tick as below. No need to link buy/POs to Trade closed

-
OK now it worked ! didn't know i could leave blocks on tick and other on trade , thought they must be all together. Thanks a lot !
-
The Trade event fires when there is some trade... event. Like a new trade created, deleted or modified. So the blocks under "on Trade" can run on any of these occasions. But you normally want to detect what exactly happened and that's why those purple blocks (like Trade closed) are used, so you can filter the particular trade event that you want. And of course, these blocks should be located at the top.
-
Hello FxDreema,
I tried the same with MT5..... but it doesnt work. Whats the problem?
shared/vAOmMoW7d
Best regards,
Martin -

-
Hello @fxdreema,
I have tested the "delete pending orders" with MT4..... it works and the same in MT5.... it doesnt delete the pending orders.
What can be wrong?
Best regards,
Martin -
I think I fixed it