this scipt only half works - delete all pending orders.
I got this script off this forum. I modified it a little, but basically the same and has only half worked in either case.
If i have 6 pending orders it will delete the last 3 placed. When i instigate the script again it will delete 2 more, leaving the first.
And if I run the script the 3 rd time it will delete the last pending order.
if anyone can help me fix it, thx a bunch.Change the loop so that it counts from total-1 down to 0. That should fix your problem.
- Tovan
Hello,
Your script seems to be ok but what happen if your I/O operations (SelectOrder, DeleteOrder) are not ok (return code != 0) ?
and why using : Sleep(1000);?
I got this script off this forum. I modified it a little, but basically the same and has only half worked in either case.
If i have 6 pending orders it will delete the last 3 placed. When i instigate the script again it will delete 2 more, leaving the first.
And if I run the script the 3 rd time it will delete the last pending order.
if anyone can help me fix it, thx a bunch.