In terms of our usual sign int's, the process looks like this:
The count starts at zero, gets to 2^31-1 = 2147483647, or 0x7FFFFFFFF. The next number is 0x80000000, or -2^31 = -2147483648, i.e. it jumps to negative values (the highest bit becomes 1). Then counting is done by adding one until it reaches -1, i.e. 0xFFFFFFFFFFFF. The processor then sets the overflow flag and the counting cycle repeats from zero.
It all depends on the interpretation of the sign bit. Technically, the counter does not know about any negative numbers and considers the high bit of the number as its high digit. But there are no unsigned numbers in MQL, so the compiler will consider the high bit as a negative number. But the internal representation of the number does not change.
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)?
It will always return the status of the last closed order. I.e. the answer is yes. Or did you find a check for "order already checked once" somewhere in this function ? :)
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
In terms of our usual sign int's, the process looks like this:
The count starts at zero, gets to 2^31-1 = 2147483647, or 0x7FFFFFFFF. The next number is 0x80000000, or -2^31 = -2147483648, i.e. it jumps to negative values (the highest bit becomes 1). Then counting is done by adding one until it reaches -1, i.e. 0xFFFFFFFFFFFF. The processor then sets the overflow flag and the counting cycle repeats from zero.
i.e. the counter returns a number between -2147483648 and 2147483647?
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)?
and in what order does GetTickCount() return?)
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)?
Or did you find a check for "order already checked once" somewhere in this function ? :)
It will always return the status of the last closed order. I.e. the answer is yes.
Cp
Cp