Changhua Lin:
Hi, is the ticketnumber the newest or the oldest ticket of the orders?
Position 0 is the newest opened trade.
Please read the help pages in metaeditor OR the link near top of every page on this website, "Documentation".
Changhua Lin: Hi, is the ticketnumber the newest or the oldest ticket of the orders? ... Sorry I'm not a programmer, I just want to know which order is newer selected by pos, 0 or 1?
My understanding is there's no guarantee the orders are returned in time order so you need to compare OrderOpenTime() of each order.
Changhua Lin:
Hi, is the ticketnumber the newest or the oldest ticket of the orders?
Hi, is the ticketnumber the newest or the oldest ticket of the orders?
You can't know for sure. As mentioned above, check the order opening time.
Changhua Lin: and how about
for(int i=ordersTotal()-1; i>=0; i--)
This way is better and preferable.

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
Hi, is the ticketnumber the newest or the oldest ticket of the orders?
and how about
Thank you.
PS: Sorry I'm not a programmer, I just want to know which order is newer selected by pos, 0 or 1?