I am trying to list the number of bullish or bearish candles in a row, for this I use plotshape and I keep a counter to count them, but I have a problem when writing the value
c = 1
if bull and bull[1]
c := c + 1
plotshape(bull, style=shape.triangledown, location=location.abovebar, color=color.green, text = tostring(c))
How can I convert 'text'=series[string] to const string.
I found the function label.new(...) but I am looking for something to have over the whole sequence and the labels only appear in the last section of candles