Currently, mql4 can only provide time down to the nearest second for incoming ticks. We use the following function:
1) Is there a different function that can provide millisecond time stamp or can be used to determine milliseconds for tick data coming to the platform?
2) will the new mql4 that is combining mql5 functions be able to request or obtain millisecond (or sub-second) time stamps on incoming ticks?
So how is the mt4 (and mt5) platform supposed to properly distinguish between ticks that come in at the 'same time'?
1) GetTickCount(), should work Live. Pointless on historical data.
2) Even mt5_data isn't saved in milliseconds. However, no_problem Live.
3) I don't see where you're going with that. If it's the same time in milliseconds then having milliseconds wouldn't help. If it's different times in milliseconds than GetTickCount() might help. Help in the sense that your code processes the current tick within less than a millisecond. How important all depends upon what you're trying to accomplish... i guess.
You have at least two choices.
1. Distinguish the ticks with the MQL's GetTickCount(), which has 16 ms precision.
2. Access PC time using GetLocalTime() from Kernell32.dll with nanosecond precision (this does not work with emulators on linux, they still return the 16 ms precision).
4evermaat: I think ticks are distinguished by Volume. Every time a new tick is sent by the broker, the Volume will increase by one. E.g. if you are looking at an M1 chart, the volume for a particular bar is how many ticks were sent in that minute.
Actually yesterday I tried to make a function that records the time with milliseconds. It used TimeCurrent() and GetTickCount(). Mathematically, it was right.. but GetTickCount() is not accurate enough. I found that rounding event times to the last second (i.e. just using TimeCurrent() ) had smaller errors than my function... :/
I'll try again another day but as far as I can see, you cannot rely on GetTickCount() if you need accuracy within a second.
Maybe C++ experts can access more accurate equivalents of GetTickCount()..?
1) From my tests, I don't believe GetTickCount() has 16ms precision. It's true, 16ms is the small value I get (apart from 0), but I don't think values about 16ms are precise to the closest 16ms. :/
2) Ah that's a great idea. I'll give that a try.
I have seen this many times before but are you sure about this? I checked this some times on my ECN broker and the volume increases quite differently on every tick, it is probably the actual traded lots flowing though that broker. For example when I sell 10 lots, next tick lots will be +10, not +1.
Volume goes up by 10 when you trade 10 lots?!? I haven't experienced that. I run a tick collector that records every tick. Sometimes volume goes up by 2 or 3 but I guessed it was very fast ticks that either the broker didn't send, or arrived while the Start function of my tick collector was still running.
Yeh, I only think Volume = Ticks from googling, but it seems to fit with the data I'm seeing