Download MetaTrader 5
To add comments, please log in or register
Publish your article and win recognition from thousands of traders!
moonsboy
889
moonsboy 2015.03.27 11:27 

 Let's say there are many loops of orders, each loop follows previous loop. In every loop, there are a series of orders and a whole loop means the series of orders are all closed based on a condition.

In order to recover the tracking once EA/terminal/PC is restarted while a loop is still ongoing, need select every order in this loop correctly. However, some orders are still open and some are closed already.

Once EA is restarted, only total orders in the ongoing loop can be retrieved, that is "ArrOrderSize" in the codes below. However, how to select the orders correctly now that some are still open and some are closed?

 

   for(int i=ArrOrderSize-1; i>=0; i--)
     {
      if(OrderSelect(i,SELECT_BY_POS)==true) 
      ......
      
whroeder1
13605
whroeder1 2015.03.27 11:56  
RTM. What pool are you reading with that OrderSelect?
/
To add comments, please log in or register