MQL4 - automated forex trading   /  

Documentation

MQL4 Reference  Trading functions  OrderDelete

 
Use the opportunities of
MQL5 in MetaTrader 5
Study the new MQL5 language
Study the new MQL5 language.
Reference is already available
bool OrderDelete( int ticket, color Color=CLR_NONE)
Deletes previously opened pending order. If the function succeeds, the return value is true. If the function fails, the return value is false. To get the detailed error information, call GetLastError().
Parameters:
ticket   -   Unique number of the order ticket.
Color   -   Color of the arrow on the chart. If the parameter is missing or has CLR_NONE value arrow will not be drawn on the chart.
Sample:
  if(Ask>var1)
    {
     OrderDelete(order_ticket);
     return(0);
    }