IS it the created order that is returned? Yes.
And is there a way to know? By OrderOpenTime().
- You may also try OrderTicket() #.
- Ticket# unreliable broker change series.
- Orders are created one-at-a-time.
- There's usually at least 1_second between them.
- Don't use Comments as Brokers could overwrite them.
- When in doubt sort your own orders.
- Make sure you're not selecting from History.
- Make sure you're not selecting by Ticket.
- Make sure you loop is counting Down -- not ++.
And is there a way to know? By OrderOpenTime().
- You may also try OrderTicket() #.
- Ticket# unreliable broker change series.
- Orders are created one-at-a-time.
- There's usually at least 1_second between them.
- Don't use Comments as Brokers could overwrite them.
- When in doubt sort your own orders.
- Make sure you're not selecting from History.
- Make sure you're not selecting by Ticket.
- Make sure you loop is counting Down -- not ++.
Thanks! Well, if created order is what is returned then I must have done something mindboggingly obtuse to get a weird order.
Again, thanks!
ubzen:
IS it the created order that is returned? Yes.And is there a way to know? By OrderOpenTime().
- You may also try OrderTicket() #.
- Ticket# unreliable broker change series.
- Orders are created one-at-a-time.
- There's usually at least 1_second between them.
- Don't use Comments as Brokers could overwrite them.
- When in doubt sort your own orders.
- Make sure you're not selecting from History.
- Make sure you're not selecting by Ticket.
- Make sure you loop is counting Down -- not ++.
Apagador: Thanks! Well, if created order is what is returned then I must have done something mindboggingly obtuse to get a weird order.
History is known to be out of sequence Order History sort by closing date - MQL4 forum
![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
An issue made me question the following:
I have been using OrderSelect(<pos>,SELECT_BY_POS,MODE_TRADES), ASSUMING that such a select was returning the ORDERS in the same order in which they had been created. Some things are now leading me to question this reasoning.
IS it the created order that is returned? If not, what order is it? And is there a way to know between 2 orders which was created first, without using comments? I mean, the time is by seconds, so I'm guessing that won't help much....