Download MetaTrader 5
To add comments, please log in or register
Subscribe to signals right in MetaTrader. It is easy!
Deklin
26
Deklin 2015.06.25 22:35 
Using MQL4, how can I get the profit / loss for the most recently closed position for a specific pair?  
whroeder1
13641
whroeder1 2015.06.25 23:46  
  1. Find "most recently closed position for a specific pair" 
  2. Select that order.
  3. Profit = OrderProfit() + OrderCommission() + OrderSwap
Deklin
26
Deklin 2015.06.26 15:19  
How can I find the "most recently closed position for a specific pair"?
DeanDeV
330
DeanDeV 2015.06.26 16:17  
deklin:
How can I find the "most recently closed position for a specific pair"?

Cycle through OrdersHistoryTotal() by using OrderSelect() and for specific pair OrderSymbol()

/
To add comments, please log in or register