Get Profit/Loss of Most Recently Closed Position by Pair

Back to topics list To post a new topic, please log in or register
avatar
7
deklin 2015.06.26 00:35
 
Using MQL4, how can I get the profit / loss for the most recently closed position for a specific pair?  
avatar
13012
WHRoeder 2015.06.26 01:46 #
 
  1. Find "most recently closed position for a specific pair" 
  2. Select that order.
  3. Profit = OrderProfit() + OrderCommission() + OrderSwap
avatar
7
deklin 2015.06.26 17:19 #
 
How can I find the "most recently closed position for a specific pair"?
avatar
120
DeanDeV 2015.06.26 18: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()

Back to topics list  

To add comments, please log in or register