![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
And it seem like that OrdersTotal() isnt the only problem.
Ive opened muti-order(A lot of orders) with my EA then every order had been closed at once.
After that i use this line of code ==>>" OrderSelect(OrdersTotal()-1,SELECT_BY_POS,MODE_TRADES);" to see what Order have been selected.
It appeared that order which is just closed by the EA is still being selected.
So,My assumtion is the problem may caused by Order pool that is unupdate.But i havent found any solution yet. And still hoping for help or suggestion.
Im also experiencing this problem.
And it seem like that OrdersTotal() isnt the only problem.
Ive opened muti-order(A lot of orders) with my EA then every order had been closed at once.
After that i use this line of code ==>>" OrderSelect(OrdersTotal()-1,SELECT_BY_POS,MODE_TRADES);" to see what Order have been selected.
It appeared that order which is just closed by the EA is still being selected.
So,My assumtion is the problem may caused by Order pool that is unupdate.But i havent found any solution yet. And still hoping for help or suggestion.
In my EA code ive put function such as OrdersTotal() frequently.So the order information will get updated many times(about 7 times) per tick.
Hi All,
I believe i have a bug in Build 482 ....
Im also experiencing this problem.
And it seem like that OrdersTotal() isnt the only problem.
Ive opened muti-order(A lot of orders) with my EA then every order had been closed at once.
After that i use this line of code ==>>" OrderSelect(OrdersTotal()-1,SELECT_BY_POS,MODE_TRADES);" to see what Order have been selected.
It appeared that order which is just closed by the EA is still being selected.
So,My assumtion is the problem may caused by Order pool that is unupdate.But i havent found any solution yet. And still hoping for help or suggestion.
Did your OrderSelect return TRUE? From what you type (you closed all orders) the argument OrdersTotal()-1 evaluates to -1.
Did your OrderSelect return TRUE? From what you type (you closed all orders) the argument OrdersTotal()-1 evaluates to -1.
Ive already tested as your suggestion. And OrderSelect always return True.Im using Build 509. Is it bug in order pool?
Ive already tested as your suggestion. And OrderSelect always return True.Im using Build 509. Is it bug in order pool?
No idea, I never tried negative numbers as parameter.