Trading blance use in expert

 

Hello Every one !!! i have question about Trading balance, how to request previews 10, 5 or any previews trades profit or loss, for example before i place new trade i want know how was profitable in past

or if no function like this me be count lite history profits and losses ?

 
forextradin:

Hello Every one !!! i have question about Trading balance, how to request previews 10, 5 or any previews trades profit or loss, for example before i place new trade i want know how was profitable in past

or if no function like this me be count lite history profits and losses ?


You need to loop through the trading history and find the 5 or 10 most recently closed trades . . . keep a running total of OrderProfit() OrderCommission() and OrderSwap()
Reason: