Single pending order cancellation/deletion

 

Hello all,


I'm trying to build an EA that trade a London Breakout strategy, and I'm completely new to coding so bear with me. I also couldn't find someone asking this specific question already on a post.

Now, the problem I'm having is that when the EA sets the pending orders at 3 AM I can't figure out how to close the order that doesn't get hit first. Has anyone done this or can explain to me what is the logic I would use to make the EA understand that is what it has to do? I'll keep searching, but for now can anyone help me?

 

When the orders get set, you can just save their prices in variables. Then if the price reaches one of these variables, you can Delete the other ones. You will probably have to select them first using OrderSelect.

When you place the orders make them equal to different ticket variables so that you can use this ticket to select them

 
Okay, thanks for the quick response.