Loop problem in MTF indicator - page 2

 

Why didnt you just do what the original programmer said in his comments about MTF which is to modify the horizontal offset and attach the indicator to the chart multiple times with different TF settings ? If the original programmer did not intend it to create a multi timeframe display, looping everything in start() is probably just forcing it to overwrite itself several times on each bar while it just creates its usual single TF output.

 
SDC:

Why didnt you just do what the original programmer said in his comments about MTF which is to modify the horizontal offset and attach the indicator to the chart multiple times with different TF settings ? If the original programmer did not intend it to create a multi timeframe display, looping everything in start() is probably just forcing it to overwrite itself several times on each bar while it just creates its usual single TF output.


SDC,

Thanks.

You solved my problem partially. As mladen had suggested on forex-tsd, I created 4 instances of almostUniqueIndex in the mq4, changed horizontalOffset/SetIndexShift for the Table/Chart display for each TF, and at least the charts now appear in the assigned places in the lower window !

But the table only appears for the lowest TF, M1.

See picture- with time, the charts seem to slide left filling the table space, and overlapping ...Code for 2nd instance (M5) attached.

Cheers,

Athar.


 

So what exactly is that indicator supposed to be revealing ?

 
SDC:

So what exactly is that indicator supposed to be revealing ?


The indicator in the lower window is what we are talking about.

This is a currency strength indi, in 4 TFs, for all 8 majors. The charts above just expand left to overlap, instead of displaying

maxBars=20 in their allotted spaces. Also only the first TF table (M1) is visible.

Athar.

 
atharmian:


The indicator in the lower window is what we are talking about.

This is a currency strength indi, in 4 TFs, for all 8 majors. The charts above just expand left to overlap, instead of displaying

maxBars=20 in their allotted spaces. Also only the first TF table (M1) is visible.

Athar.


The problem appears to be lack of a delete line code. The old bars are not being removed, and the new bars formed stay in place pushing old bars to the left. MQL4 is a curse...bad documentation and just weird code.


Athar.

Reason: