Hello
Why does CopyTicks return ticks that are older than the [in] date parameter? From the documentation:
[in] The date from which you want to request ticks. In milliseconds since 1970.01.01. If from=0, the last count ticks will be returned.
I have a tick helper class that calls my CopyTicks function. I call this function multiple times until the required ticks have been read. Each successive call will pass the date parameter with the millisecond time + 1 of the last tick of the previous call. In this way I can process a lot of ticks (eg. 300 million or more) without overloading memory.
Mql CopyTicks behaves as expected until [in] + count exceeds the end of price history, ie new ticks not yet received. So, if I call Mql CopyTicks with [in] set to the millisecond time of the last tick in the price history, this function will return several thousand ticks BEFORE [in].
Rob
If I understand well you are calling this function to get inexistent ticks ? Seems like a bug, but it also seems easy to avoid.
What are the date/count values when it happens ?
Hi Alain
[in] = 1622242799967, count = 20000000, symbol = #Germany30
Returns 87,076 ticks between 1622172662124 and 1622242799966.
Yes, it is easy to avoid, but it's still a bug and should be fixed.
Thanks,
Rob

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello
Why does CopyTicks return ticks that are older than the [in] date parameter? From the documentation:
[in] The date from which you want to request ticks. In milliseconds since 1970.01.01. If from=0, the last count ticks will be returned.
I have a tick helper class that calls my CopyTicks function. I call this function multiple times until the required ticks have been read. Each successive call will pass the date parameter with the millisecond time + 1 of the last tick of the previous call. In this way I can process a lot of ticks (eg. 300 million or more) without overloading memory.
Mql CopyTicks behaves as expected until [in] + count exceeds the end of price history, ie new ticks not yet received. So, if I call Mql CopyTicks with [in] set to the millisecond time of the last tick in the price history, this function will return several thousand ticks BEFORE [in].
Rob