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.
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
- votes: 11
- 2008.06.05
- . ... Rick D. ... .
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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