[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 202

 
eddy:
What is the number of millisecond overflows that GetTickCount() refers to?
2^31-1, as far as I can see.
 

Lied.

Since time is stored as unsigned integer, 2^32-1. But you should keep in mind that GetTickCount() returns signed int type, i.e. the actual maximum value of the counter in int terms will be -1.

 
eddy:
if you call deinit() from start() - will the indicator be deleted?

It's not deleted. It's just a function. The code within the function is executed. Removing an indicator calls "deinit()", not deinit() removal.

Indicator deletion by name and by list is implemented in the library. Only it is not available to all.

 
alsu:

2^32-1. But in terms of int equals -1.

but can it just be a number?) I just want to know the difference between a tick with time 99999 and a tick with time 99 when the counter overflows.

As far as I understand it, it is equal to 99 + (overflow number - 99999)

 
eddy:

but can I just get a number?) I just want to know the difference between a tick with time 99999 and a tick with time 99 when the counter overflows.

As far as I understand it, it is equal to 99 + (overflow number - 99999)

At overflow the counter becomes zero. The step before it is equal to -1.
 
and up to -1 what does it equal?
 
eddy:
and before -1 what does it equal?
-2 of course.
 
and when is it equal to its maximum value?
 
eddy:
and when is it equal to its maximum value?
we see the maximum value as -1, because for int the high bit is the sign bit. In hexadecimal, the minus one looks like 0xFFFFFFFFFF, i.e. this is the last value the counter takes before it is reset to zero.
 

Question on isCloseLastPosByStop().

Will it check for the same closed order if there are no subsequent closed orders (i.e. this order will not be the last one)?