Download MetaTrader 5

Please help with GetTickCount(). Documentation is poorly written.

To add comments, please log in or register
The Market has more than 400 indicators. Try any of them!
skatt
186
skatt 2014.04.29 15:43 

I'd like to use GetTickCount(), but the documentation is so confusing. Please help.

According to the GetTickCount() documentation, it returns the "number of milliseconds that elapsed since the system start". Does that mean since the start of the expert program, the trading terminal, or the operating system?

Also, the documentation states that the unsigned integer is "overfilled" every 49.7 days? What does that mean? Does GetTickCount() stop changing at the highest value? Does it restart at 0? Or does it return an unusable value that crashes the program?

Ex Ovo Omnia
3121
Ex Ovo Omnia 2014.04.29 15:50  

The function is encapsulated windows call. So the description match DWORD WINAPI GetTickCount(void);

skatt
186
skatt 2014.04.29 15:57  
Ovo:

The function is encapsulated windows call. So the description match DWORD WINAPI GetTickCount(void);


Thanks.
Alain Verleyen
Moderator
30707
Alain Verleyen 2014.04.29 16:01  
skatt:

I'd like to use GetTickCount(), but the documentation is so confusing. Please help.

According to the GetTickCount() documentation, it returns the "number of milliseconds that elapsed since the system start". Does that mean since the start of the expert program, the trading terminal, or the operating system?

Also, the documentation states that the unsigned integer is "overfilled" every 49.7 days? What does that mean? Does GetTickCount() stop changing at the highest value? Does it restart at 0? Or does it return an unusable value that crashes the program?

It's the operating system (computer) start.

GetTickCount() return an unsigned int, which max value is 4 294 967 295. It's ~49.7 days. If your computer is running for longer than that, GetTickCount() restarts from 0.

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.04.29 16:05  
Usually we reset back to zero once we get the ms value from last operations.
To add comments, please log in or register