How to Label with text on a Plotted Horizontal Line

2.4k Views Asked by At

I am using TradingView - Pine Script v5. I have written a program that takes variable averages from previous days to plot straight horizontal levels for each day. I would like to label these lines respectively. Once the variables is set in the first moment of the day, it will stay like that until day close, so it a "constant", but am having difficulty identifying/setting "yloc" value. Is there a simple way to add a label to each of these lines?

Thanks in advance!

enter image description here

1

There are 1 best solutions below