Close trades and delete orders using open time
-
Hi, can any one know how to set a robot to delete orders that were placed same time when the trade was executed and leave the rest(other trades and orders)?
-
Not sure I fully understand. Could you please be more specific?
-
Hi, thanx for the reply. When a condition is met a buy with a lot size of e,g 2 is executed, that automatically places a pending other of lot size eg 4, and it does that for multiple trades. So i want the order that was placed to be deleted if the buy closed without triggering it. I dont want it to delete all orders but only the order that was placed when a trade was made eg buy closes with tp and did not trigger the sell then delete the order.
-
i want the pending order to be there as long as the one specific trade is there but if it closes whether with stoploss or take profit, to then the pending order to be deleted.
-
@Siyanda The way to delete an untriggered pending order is by using the 'on trade' tab like this:

-
Okay Thank you. I will try it.
-
this deletes all untriggered orders.
-
Ok. In that case you need an array where the ticket numbers of those trades are to be selected. I'm afraid you will need a programmer to do it. I cannot be of more help in this case.