Quote:
Originally Posted by jlpi
I know why
It is because you use the loop on orders the following way
for(int i=0;i<OrdersTotal();i++)
Then think about what that does. every time you close an order the OrdersTotal() decreases and on the other side i increases. So no surprise that every time half of the orders only are closed as the interval is reduced on each extremity for every iteration.
the correct loop is
for(int i=OrdersTotal()-1; i>=0;i--)
|
Thank you very very much!

yours should work!
I will try now.