I've build an indicator that gives me a bar label above the High[0] and below the Low[0] that shows where the High or Low is in relation to a SMA, Bollinger 1 and Bollinger 2. So for instance, if the High[0] is between the SMA and BB1, the label will be "BB1".
When you plot these labels on a chart, they plot perfect for historical bars, however on the current bar when COBC = false, NT plots multiple labels if the label changes from SMA to BB1 or BB2.
I'm currently using:
DrawText("upperBB1" + CurrentBar, "BB1", 0, High[0] + 3 * TickSize, Color.Red);
I'd like to modify my code such that when COBC = false, only one label is drawn as the bar develops.
Does anyone have any ideas on how I might do this?
Please let me know if you have any questions.
Thanks for your help,
Aventeren

Comment