Get Profit/Loss of Most Recently Closed Position by Pair

 
Using MQL4, how can I get the profit / loss for the most recently closed position for a specific pair?  
 
  1. Find "most recently closed position for a specific pair" 
  2. Select that order.
  3. Profit = OrderProfit() + OrderCommission() + OrderSwap
 
How can I find the "most recently closed position for a specific pair"?
 
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()