OrderSwap - Trade Functions - MQL4 Reference

MQL4 Reference Trade Functions OrderSwap

OrderSwap

Returns swap value of the currently selected order.

double  OrderSwap();

Returned value

Swap value of the currently selected order.

Note

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

Example:

  if(OrderSelect(order_id, SELECT_BY_TICKET)==true)
    Print("Swap for the order #", order_id, " ",OrderSwap());
  else
    Print("OrderSelect failed error code is",GetLastError());