Download MetaTrader 5

question about using index in orderselect function (when I write "0" is giving me data of the first operation, not the last one)

To add comments, please log in or register
trader201 2014.07.16 19:02 
I'm writing "0" in the index of orderselect function  to refer to the last closed operation, but when I do this, it is giving me the data of the first closed operation (the first in the history accounts).

What is happening here, and what I need to do, for make reference to the last operation closed?

Thanks in advance

qjol 2014.07.16 20:05  
OrdersTotal() - 1 // for open trades
OrdersHistoryTotal() - 1 // for closed trades (history)

0 is the first one, not the last

trader201 2014.07.16 21:23  
Thank you gjol.
To add comments, please log in or register