MQL4参考 交易函数 OrderClosePrice

OrderClosePrice

Returns close price of the currently selected order.

double  OrderClosePrice();

Returned value

The close price of currently selected order.

Note

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

Example:

  if(OrderSelect(10,SELECT_BY_POS,MODE_HISTORY)==true)
    {
     datetime ctm=OrderOpenTime();
     if(ctm>0) Print("Open time for the order 10 ", ctm);
     ctm=OrderCloseTime();
     if(ctm>0) Print("Close time for the order 10 ", ctm);
    }
  else
    Print("OrderSelect failed error code is",GetLastError());