Detailed description in the documentation
Help Center?Alerts?Alerts settings? How to use a variable value in alert
The ability to generate variable text in alerts is very limited. I couldn't output a string variable in the alerts. In the following snippet, a workaround is how to
output a color type variable in an alert.
plot(ColorS == #FF8C00 ? 1 : -1, title="colorA", display=display.none)
alertcondition(cross(LagFF,LagFS) and ColorF==ColorS, title='LagF', message='LagF cross {{ticker}} {{interval}} Up/Down {{plot("colorA")}}' )
Leave a feature request with TradingView via their support ticketing system. I think it is possible to add a placeholder {{label}}.
[ADDED]
Now you can do it like this
if scr_label!=""
alert("Screener Alert:"+scr_label, alert.freq_once_per_bar_close)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…