How consistent is MT?

 

I'd like to know if anyone else has found MT to calculate incorrectly, particularly something it ordinarily calculates correctly. The following worries me and I wonder if anyone has any thoughts about it.

1 The low preceding the current bar is 5 bars back (iLowest(NULL, NULL,MODE_LOW,10,1)).

2 MT in this case counted 4.

3 It had been counting correctly before this.

4 Following this event it continued to count correctly. No changes, no recompilation, nothing.

This is all forward, real time, no tester. Why did it miscount only in this case?

Thanks.

 
The most likely explanation is that there is an error in your code. Does your code report an error if there is a loss of connectivity ?
 
Insufficient information about what happened. Show print out of the log file.
 
RaptorUK:
The most likely explanation is that there is an error in your code. Does your code report an error if there is a loss of connectivity ?

RaptorUK:
The most likely explanation is that there is an error in your code. Does your code report an error if there is a loss of connectivity ?

It's a simple calculation: iLowest(NULL, NULL,MODE_LOW,10,1). On that bar, it's incorrect. On a hundred other bars, it's been correct before and since. If a code mistake can do that, perhaps you could suggest how?

Thanks for the reply.

 
Lou:

If a code mistake can do that, perhaps you could suggest how?

The only way anyone can do that is look at the actual code, and your "interpretation" of what is a mistake, and what is not.

Everything else is just pure speculation.

 
Lou:
It's a simple calculation: iLowest(NULL, NULL,MODE_LOW,10,1).
iLowest(NULL, 0, MODE_LOW,10,1).
 
NULL and 0 gives the same results.
 
Lou:

On a hundred other bars, it's been correct before and since. If a code mistake can do that, perhaps you could suggest how?

Thanks for the reply.

Perhaps something different happened this time compared to the hundred bars before and since . . maybe like a loss of connectivity. Does your code report an error if there is a loss of connectivity ?

But as ubzen and blogzr3 have already said, without some further info it's hard to give any meaningful suggestions . . .

 
RaptorUK:

Perhaps something different happened this time compared to the hundred bars before and since . . maybe like a loss of connectivity. Does your code report an error if there is a loss of connectivity ?

But as ubzen and blogzr3 have already said, without some further info it's hard to give any meaningful suggestions . . .


I solved the mystery ...

I had recently changed my Time functions from TimeCurrent to TimeLocal. It turns out that SOMETIMES, the Local minute is the same as the Current minute, but not always. What is happening in that graphic I posted is that the Local minute came in one less than the Current minute. So MT was reading from the same bar twice. The new bar had not yet been drawn. That would happen seconds later when the TimeCurrent minute changed.

I have switched everything back to TimeCurrent only and do my own calculation from that to determine local time.

But thanks for playing, everyone.

 
Thanks for the update, well done for finding it. :-)
Reason: