Hello everyone,
I'm trying to use the CopyTicksRange function and it does not copy any ticks. I'm connected to the FTMO server and I'm able to download the ticks through the symbols menu and also, I'm able to get rates using CopyRates. Here is an example:
This shows the following:
As it can be seen the number of ticks is 0.
I've even tried to select the history using:
No luck with these approaches. Anyone has any idea? Am I missing something? Is this a bug?
Many thanks,
Kevin
Try this algorithm
Free download of the 'Download all ticks of a symbol's history' expert by 'LoRio' for MetaTrader 5 in the MQL5 Code Base, 2025.02.22
- www.mql5.com
int count = CopyTicksRange( _Symbol, ticks, COPY_TICKS_ALL, 1747959921000, 1748039121000 );
I'm trying to use the CopyTicksRange function and it does not copy any ticks. I'm connected to the FTMO server and I'm able to download the ticks through the symbols menu and also, I'm able to get rates using CopyRates. Here is an example:
This shows the following:
As it can be seen the number of ticks is 0.
I've even tried to select the history using:
No luck with these approaches. Anyone has any idea? Am I missing something? Is this a bug?
Do not call CopyTicksRange in OnInit.
You did not specify what type of the program you're writing - this is important, because in indicators CopyTicksRange works asynchronously - if tick history is not yet available, the call will return 0 immediately and start ticks history synchronization, so your program needs to repeat request after a while.
I understand the frustration that can come with certain aspects of working in MQL5, especially when one expects a more event-driven behavior. However, your comment feels more like a personal vent than a concrete contribution to the issue being discussed.
Saying that MQL5 is "weak" because it’s not event-controlled isn't entirely accurate. The language provides tools like OnTimer that are specifically designed to handle asynchronous scenarios, such as waiting for tick history to synchronize.
This kind of periodic check is both valid and commonly used, nothing overly complex.
It's less about a limitation of the language and more about understanding and applying the available tools effectively. Sharing that kind of practical solution would be much more helpful to others facing similar problems.

- 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 everyone,
I'm trying to use the CopyTicksRange function and it does not copy any ticks. I'm connected to the FTMO server and I'm able to download the ticks through the symbols menu and also, I'm able to get rates using CopyRates. Here is an example:
This shows the following:
As it can be seen the number of ticks is 0.
I've even tried to select the history using:
No luck with these approaches. Anyone has any idea? Am I missing something? Is this a bug?
Many thanks,
Kevin