I am coding long short entry exit conditions and trying to plot shapes on TradingView chart based on those conditions, but I need to use custom location rather than the inbuilt location options. I particularly need to move the shapes on the Y axis to change their vertical positions. How can I do so with pine script?
I have tried the following, but it didn't worked -
var label longconditionlabel = na
if longcondition
longconditionlabel := label.new(bar_index, low, style = label.style_triangleup, color = color.green)
label.set_y(longconditionlabel, low * 0.75)
var label shortconditionlabel = na
if shortcondition
shortconditionlabel := label.new(bar_index, low, style = label.style_triangledown, color = color.red)
label.set_y(shortconditionlabel , high * 0.75)