Hi
I'm learn programming
I write a program but it have problem.
it can not close all open positions at a point
Please see
![](https://c.mql5.com/mql4/forum/2015/03/km_1.png)
Please solve my problem
thanks
Files:
test.mq4
3 kb
- I need a code
- Not closing all open positions with magic number error
- Problem with iCustom?
gooly:
1) you don't check OrderSelect(), what if it fails?
2) if you want to close orders you need to count down!
This might solve your problem.
Typo
/*to do*/ for(int i=OrdersTotal()-1; i<=0; i--)
Yes, thanks GumRai!
gooly:
1) you don't check OrderSelect(), what if it fails? 2) if you want to close orders you need to count down! |
|
thanks gooly , GumRai and WHRoeder ...... problem is solve
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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