When you open a trade hold the ticket number in a variable,
if i may, use globals in case you have/must restart the EA/computer/terminal
you can check OrdersHistoryTotal too
Could EA Really Live By Order_History Alone? - MQL4 forum
Yes or you can write a recovery function to run from OnInit(). My own preferred method is to use local static vars and a recovery function because it goes faster in strategy tester.
To add comments, please log in or register