Pine Script Plotshape() not stable (the shapes are moving up and down with the change in chart)

Viewed 143

Normal when add the script to chart Normal when add the script to chart

Goes above the bar when moving a little vertically Goes above the bar when moving a little vertically


plotshape(buy, "Buy", style=shape.labelup, color=color.green, location=location.belowbar, text="buy", textcolor=color.white, size = size.normal)
plotshape(sell, "Sell", style=shape.labeldown, color=color.red, location=location.abovebar, text="sell", textcolor=color.white, size = size.normal)

How to solve this problem?

I removed the scale= scale.none from indicator() version 5

0 Answers
Related