MQL4参考 交易函数 OrderDelete

OrderDelete

Deletes previously opened pending order.

bool  OrderDelete(
   int        ticket,      // ticket
   color      arrow_color  // color
   );

Parameters

ticket

[in]  Unique number of the order ticket.

arrow_color

[in]  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.

Returned value

If the function succeeds, it returns true, otherwise false. To get the detailed error information, call the GetLastError() function.

Example:

  if(Ask>var1)
    {
     OrderDelete(order_ticket);
     return(0);
    }