Stop pending order from executing?

 

Is there a way to prevent a pending order from executing when it's hit? For example: when an open buy stop order is triggered, I want to have an "if" statement to then decide if the order is filled or not.

I just don't know if there's anywhere to interject the order. Thanks for any guidance.

 
Generally EAs do not need to use pendings at all. Bots are not human beings and can monitor markets per tick and execute all by market price.
 
Theo H.:

Is there a way to prevent a pending order from executing when it's hit? For example: when an open buy stop order is triggered, I want to have an "if" statement to then decide if the order is filled or not.

I just don't know if there's anywhere to interject the order. Thanks for any guidance.

No.  
If you haven’t made your mind up to trade at that price don’t place an order.  
If you changed your mind delete the order before it is executed 
EndOfOptions()
 

Hi

You cannot add any if statement before triggering pending order – as was said you can always delete them manually before activation.

But you can write a simple EA whch manage the trades on its own – and then it monitors market and place the trades on the proper levels (like normal pending orders but only open market orders) and within the EA you can add as many conditions as you wished. So this is the solution.

Best Regards