chingching wrote >>
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);?

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.