Download MetaTrader 5

Get Profit/Loss of Most Recently Closed Position by Pair

To add comments, please log in or register
No PC at hand? Communicate with friends using your mobile phone!
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
14530
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