Indicator getting corrupted - page 4

 
RaptorUK:

If I'm looking for lines that seem to be disconnected from the chart bars (as per your first post) then I'm not getting any problems.

Fourth screenshot looks interesting. As far as I can see, the cut-down code should draw a line every 25 minutes, between the low/high of the last 20 bars. Therefore, a series of lines with a gap of 5 minutes between them. But in your last screenshot there are overlapping lines. Could potentially be caused by things like recompiling the indicator when it's already attached to a chart, but do you have any idea what actually caused this?
 
jjc:
Could potentially be caused by things like recompiling the indicator when it's already attached to a chart, but do you have any idea what caused this?
The Indicator was attached and nothing else . . . no restarts for any reason.
 
jjc:
Fourth screenshot looks interesting.
There are missing bars, from 17:08 the next bar is 17:15, 17:00 bar is missing too . .
 
RaptorUK:
There are missing bars, from 17:08 the next bar is 17:15, 17:00 bar is missing too . .
Yes, of course that explains it. The lines get drawn every 25 minutes, not every 25 M1 bars. Therefore they can overlap. Ignore me; my observation was completely irrelevant to the main phenomenon - which you can't (yet) replicate - of the lines becoming detached from the bars.
 
jjc:
Ignore me; my observation was completely irrelevant to the main phenomenon - which you can't (yet) replicate - of the lines becoming detached from the bars.
...assuming, of course, that this cut-down indicator is meant to be able to replicate the original phenomenon of the lines becoming detached, and that the lines overlapping is an expected issue rather than something that's regarded as a bug and proof that there's a problem.
 
I have an idea . . . but have to go out now, I've added the Indicator to a new chart, will test my idea when I get back and post results.
 
RaptorUK:
I have an idea . . . but have to go out now, I've added the Indicator to a new chart, will test my idea when I get back and post results.
I'd wait for confirmation from AnkaSoftware that this cut-down indicator replicates the original problem (detached lines), rather than the overlapping lines being supposedly an indication of a problem.

I should have picked up on this immediately because I thought "Use of TimeCurrent() in an indicator? How strange". It's obviously strange precisely because - as here - it is almost inevitably tied to an invalid assumption that there will be an uninterrupted series of bars. If you're going to use TimeCurrent() in a cut-down example such as this one, then it probably indicates that you have also done something similar in the original code, and therefore that there will be problems around gaps in the bar sequence.

I still can't see how the cut-down code could lead to detached lines without there indeed being an MT4 problem of some kind, but the use of TimeCurrent() makes me more suspicious than ever that this is the sort of bug which was implied by the previous screenshots.
 
jjc:
I'd wait for confirmation from AnkaSoftware that this cut-down indicator replicates the original problem (detached lines), rather than the overlapping lines being supposedly an indication of a problem.

I should have picked up on this immediately because I thought "Use of TimeCurrent() in an indicator? How strange". It's obviously strange precisely because - as here - it is almost inevitably tied to an invalid assumption that there will be an uninterrupted series of bars. If you're going to use TimeCurrent() in a cut-down example such as this one, then it probably indicates that you have also done something similar in the original code, and therefore that there will be problems around gaps in the bar sequence.

I still can't see how the cut-down code could lead to detached lines without there indeed being an MT4 problem of some kind, but the use of TimeCurrent() makes me more suspicious than ever that this is the sort of bug which was implied by the previous screenshots.

On my system, the cut down code is able to reproduce the original problem of detached lines.

If you go through the xls file with the indicator array dump, the indices of the indicator line data shift in the array. So a indicator line which was valid between bars t1 and t2, gets shifted to bars t3 and t4 and appears detached.

TimeCurrent is used only to get a signal to draw the lines at specified intervals.The bars are always drawn from T - 1 to T - 20.

Raptor - What is your 'Max bars on chart' setting? Try with a setting of 10,000.

 
AnkaSoftware:

On my system, the cut down code is able to reproduce the original problem of detached lines. [...]

If you want another possible MT4 bug to pursue, what happens if you use Low[i] and High[i] rather than iLow() and iHigh() ?
 
AnkaSoftware:
Enclosed is sample indicator, which will reproduce the problem. On 64 bit Windows platform, attach indicator to a M1 chart, and let it run for 4+ hrs.

What do you mean by corruptions? I have just attached your indicator at EURUSD M1 and I don't see any values.


Reason: