Download MetaTrader 5

TimeCurrent function lacking millisecond precision.....

To add comments, please log in or register
Have you developed a profitable strategy? Launch your trading signal and make profit from it!
Jon Grah
Jon Grah 2015.08.31 14:56 

Why doesn't the TimeCurrent function print millisecond precision or allow the user to specify whether they want millisecond precision?  It doesn't make sense that the mt4 terminal expert/journal real-time logs, backtest journal logs, and server ping functions have access to millisecond precision, but the TimeCurrent function does not print millisecond precision to allow users to mark each transaction they want to log separately or print on their chart with millisecond precision.

Can someone comment on this and what (if any) workarounds exist?

Demos Stogios
Demos Stogios 2015.08.31 21:41  


About the question "why millisecond precision is not provided by TimeCurrent()", I guess it is just a design decision of MetaQuotes; they may believe that we do not need ms precision, and if you ask me, we really do not. But anyway, there is GetTickCount(), with the "caveat" that it gives you milliseconds from the system start (not calendar time). Some other options could be to use C library or Windows API or some library in general providing timers


best regards 

Jon Grah
Jon Grah 2015.09.07 05:32  

I actually forgot that I asked this question almost 2 years ago and got good feedback:

But yes, automated traders do need at least millisecond precision for logging purposes.  How else do you prove which activity came first if you have several that occur on the same second?  You use precise timestamps, as not every activity has a ticket number.  Or you may re-use the same ticket number.  There is no good reason NOT to have millisecond / microsecond precision. A modern trading platform should have at least millisecond timestamps, just like historical tick data does.


To add comments, please log in or register