Download MetaTrader 5

When next bar open with gap ? How to cancel pending order ?

To add comments, please log in or register
sorasit
359
sorasit  

Open pending order by Buy Stop.

If next bar open price with gap jump over buy stop level more than 10 pips.

How to delete pending order before change position from buy stop to buy order ?


thank you

qjol
3243
qjol  

if the gap makes the price jump over your buy stop level you can't delete it any more (OrderDelete) because the order has already triggered

you can close it (OrderClose) if you want

whroeder1
14774
whroeder1  

If it gaps up over your trigger it's already too late to delete it.

Don't use buystops in EAs. Those are for Humans that can't watch every tick of the day.

Have the EA check for price at or above your trigger price and less than your trigger + max slippage. Open an order. If it's above max, you've missed it.
sorasit
359
sorasit  
thank you
To add comments, please log in or register