Sort order of tickets and position numbers

 

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

 

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.)

 

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?

 

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.
 
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.
 
Thanks, bye
 

I tried to decipher the code in https://www.mql5.com/en/code/8126 ... but i got lost

Would someone like to get paid to extract just the code to sort the Account History so i can use it in my EA before i check closed results.  


thanks,

Mike

Report
Report
  • votes: 11
  • 2008.06.05
  • . ... Rick D. ... .
  • www.mql5.com
Report generator: allows you to select data from history by a preset criterion; allows you to sort the displayed data by any field or by a group of fields; allows you to show/hide specific columns; additionally displays statistics on the selected orders and other parameters. The script can be launched in any window. The final file is created...
Reason: