I have an indicator which draws rectangles from signal bars to the current bar (bar 0). The rectangle objects are held in a collection, and on each bar update, the rectangles redraw so that they all update to the current bar.
IF the signal bar, where a rectangle starts from, is viewable on the chart, then the rectangle will plot correctly. However, when the signal bar gets old enough so that it is no longer viewable, then the rectangles don't project to the future.
The rectangle is somehow there, because if I make the chart big enough or compressed enough to include the starting point of the rectangle (the signal bar) then the rectangle once again plots correctly.
I'm tearing my hair out trying to figure out how to correct this. Any ideas?
Comment