Problem Deleting pending order with time (MQL5) - page 2

 
Vladimir Karputov #:

Thanks. Here is the function:

Thank You Vladimir. I wanted to ask, Is it possible to delete a pending order after 10 pips? If price goes the opposite direction delete the pending order after 10 pips? 
 
Jack Buda # :
Thank You Vladimir. I wanted to ask, Is it possible to delete a pending order after 10 pips? If price goes the opposite direction delete the pending order after 10 pips? 

You need to compare two prices: 'm_order.PriceOpen' and 'm_order.PriceCurrent'

Documentation on MQL5: Standard Library / Trade Classes / COrderInfo / PriceOpen
Documentation on MQL5: Standard Library / Trade Classes / COrderInfo / PriceOpen
  • www.mql5.com
PriceOpen - COrderInfo - Trade Classes - Standard Library - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5