MQL4 Reference Trade Functions OrderExpiration

OrderExpiration

Returns expiration date of the selected pending order.

datetime  OrderExpiration();

Returned value

Expiration date of the selected pending order.

Note

The order must be previously selected by the OrderSelect() function.

Example:

  if(OrderSelect(10, SELECT_BY_TICKET)==true)
    Print("Order expiration for the order #10 is ",OrderExpiration());
  else
    Print("OrderSelect returned error of ",GetLastError());