Download MetaTrader 5

Sort order of tickets and position numbers

To add comments, please log in or register
gszabo
108
gszabo  

Hi,

Does somebody know what the order of tick numbers and position numbers (in trade and history pools)?

Whether tick2 > tick1 => time of OrderSend 2 > time of OrderSend 1 ?

Whether pos2 > pos1 => time of OrderSend 2 > time of OrderSend 1 ?

I.e. are the ticks and position numbers generated in the sending time order of OrderSends?

Can I base my programs on that if a trade was sent after another trade then it's ticket and pos will be greater than the other one?


Thanks

Gabor

GreenMoney
379
GreenMoney  

Don't assume the trade and history pools are sorted in any particular order; rather, assume they are not sort in any way.

Then create an algorithm to read the selected pool and sort the data to your specifications.

(If you search the forums, you should be able to find some example code that will help you.)

gszabo
108
gszabo  

Thank you, the coding itself is not a problem just the working of the system. :-)

I have read somwhere that the tickets are strictly in order of generating time (time of OrderSend). You spoke about only the positions in pools. Are you agree with the ticket order statement?

GreenMoney
379
GreenMoney  

gszabo:

. . . 

I have read somwhere that the tickets are strictly in order of generating time (time of OrderSend). You spoke about only the positions in pools. Are you agree with the ticket order statement?


It is better to simply assume that order history is not sorted in any particular way and, then, to create an algorithm to sort the trade history to your specification.
whroeder1
14785
whroeder1  
gszabo: Does somebody know what the order of tick numbers and position numbers (in trade and history pools)?
It is mostly by close time, but not always.
Don't assume, sort it.
gszabo
108
gszabo  
Thanks, bye
To add comments, please log in or register