I use labels very well in overlayed indicators but now I'm stuck when trying to use it in a Pane (in a basic v5 MACD code I customized).
label.new(hist[0] < hist[1] and hist[2] < hist[1] and ShowLabels ? bar_index : na, high, color=#FF0000, text="S", textcolor=color.white, tooltip = "MACD Sell", style=label.style_label_down)
It returns with the following error message:
The 'timeframe' argument is incompatible with functions that have side effects
I have a suspicion that bar_index and/or high is problematic but didn't find how to make label.new() functions Pane-compliant.