Dear All,
I am learning pinescript 5 on tradingview platform. I a novice developer. Need guidance of the forum members.
The script is to create label the bar. This part I have completed that when a condition is satisfied the bar is labeled as anchor
above the bar.
However when new candles are presented another condition is checked, if this condition is satisfied then the old lable of anchor is to be deleted and new label is to be created above the same bar POI
.
The 2 problems I am facing is
In the first condition check the candle is identified as high[3] and after condition check the label is printed above high[3]. After new candles are presented and after second check how to refer to that same candle? is there a unique id for a bar which can be used?
How to identify the existing label
anchor
above that bar, delete the existing label and then stamp a new label by referring to the bar.
I hope I have been able to explain. English is not my native language.
Thanks.