I am implementing an indicator on NT7 platform. This indicator does some calculation then assign it a BarType to indicate it is Up or Down. Inside the Indicator program, I try to maintain the last 4 groups of the bars.
When the coming bar is the same color as 1st bar cluster, it will be added into the 1st cluster automatically. However, if the bar is a different color, it will wait the 2nd bar close to make the decision. If the 2nd bar is also different to the color of 1st cluster (aka 2nd bar is the same color as its previous one), then I shift 3rd cluster to the 4th, the 2nd cluster to the 3rd, 1st cluster to the 2nd, 1st cluster is cleared before the two new bars are added.
I have debugged to make sure the bars in the 1st cluster are all correct. However, something very strange happened. Though I have only 1 place to manipulate the values of those clusters, it is assigned somewhere else. I have tracked the debug message and captured the output window together with the source code.
Please help me on this. It is really strange. I suspect I missed something important in the big picture. But I have no idea what it is.
Thank you very much!!!
Best Regards
David
Comment