TimeCurrent function lacking millisecond precision.....

Back to topics list To post a new topic, please log in or register
avatar
249
4evermaat 2015.08.31 16: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?

avatar
126
Demos 2015.08.31 23:41 #
 

Hello,

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 

avatar
249
4evermaat 2015.09.07 07:32 #
 

I actually forgot that I asked this question almost 2 years ago and got good feedback:  https://forum.mql4.com/57809

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.

Continue:  https://forum.mql4.com/57809

Back to topics list  

To add comments, please log in or register