What happens if you are counting down instead of counting up?
for(int iPos=OrdersTotal()-1; iPos>=0; iPos--) if(OrderSelect(iPos,SELECT_BY_POS)
That's how i manage my orders and of course the position will change if one of those orders were closed.
Totally normal
What is the issue ?
What happens if you are counting down instead of counting up?
That's how i manage my orders and of course the position will change if one of those orders were closed.
If delete/close order in loop, I will use count down.
But if READ ONLY in loop, it's unnecessary.
Orders open sort by time open ( order number )
Totally normal
What is the issue ?
There was never any guarantee on the order sorting. If you want a specific sorting, you have to code it.
It was always like this (which doesn't mean there is no change on the actual sorting).
There was never any guarantee on the order sorting. If you want a specific sorting, you have to code it.
It was always like this (which doesn't mean there is no change on the actual sorting).
We made research ago (around 2010), it was sorted by ticket number.
Probably we are wrong, so it is time to clarify this concept.
Anyway, could MetaQuotes give us an official definition and add it into MQL4 Reference?
We made research ago (around 2010), it was sorted by ticket number.
Probably we are wrong, so it is time to clarify this concept.
Anyway, could MetaQuotes give us an official definition and add it into MQL4 Reference?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Is it corrct?