The problem is it's drawing hundreds of boxes on every date, as if it's drawing that box for every instance in the series that matches the time criteria, but on every instance it draws all the instances before it on top of each other. If I remove the unique barTag for the draw call, it will draw only once, but only for the most recent time period, and none before it.
What am I doing wrong?
protected override void OnBarUpdate() { if (Time[-1].Hour == 10) { string barTag = CurrentBar.ToString(); DrawRectangle(barTag, true, 59, Open[59] - TickSize, -1, Open[-1] + TickSize, Color.PaleGreen, Color.PaleGreen, 2); } }
Comment