There is always lost ticks if you use OnTick(), please read the documentation. See https://www.mql5.com/en/forum/14960
You have to use CopyTicks().
There is always lost ticks if you use OnTick(), please read the documentation. See https://www.mql5.com/en/forum/14960
You have to use CopyTicks().
Hallo Alain,
thanks for your answer.
Unfortunately I cannot find CopyTicks() in MQL4, only in MQL5. But I'm using MQL4 :-(
Matthias
Hallo Alain,
thanks for your answer.
Unfortunately I cannot find CopyTicks() in MQL4, only in MQL5. But I'm using MQL4 :-(
Matthias
Sorry I didn't note it was for mql4.
For mql4, there is no 'true' solution. You can use a VPS to reduce the latency and optimize your code to return quickly so you will minimize the chance to loss ticks.

- 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
here is a simple expert advisor which writes some tickdata for each tick arriving, and - if there is a new 1 minute bar - writes some bar data to a file:
I noticed that very often (not always) the number of ticks written into the output file is smaller than the volume of the belonging bar.
E.g.:
For the M1-Period 17:52:00 I would expect 14 ticks but I only see 13????
Often the discrepancies are much greater, for example the volume of the M1-Period is 142, but there are only 121 ticks.
Do I suffer from a basic misunderstanding? Is there any error in the mql4-Program? Or may be a performance issue: the expert advisor is too slow (although it does not do much)?
I'm grateful for any answer. Thank you.
Matthias/Bobcat