July 2, 2020
Tooltips Added to Pine Labels

You can now add tooltips to labels created in Pine. Tooltips appear when you hover your cursor over a specific label.

The tooltip’s text can be set when creating a new label, in which case you use the new`tooltip=`  parameter with the `label.new()` function. You can also modify the tooltip’s text dynamically using the new `label.set_tooltip()` function, as we do in this example:

study("Tooltips", overlay = true)
var labelHi = label.new(bar_index, high, text = "High")
var labelLo = label.new(bar_index, low,  text = "Low", style = label.style_label_up)
label.set_xy(labelHi, bar_index, high)
label.set_xy(labelLo, bar_index, low)
label.set_tooltip(labelHi, "High is " + tostring(high))
label.set_tooltip(labelLo, "Low is "  + tostring(low))

We hope this update is helpful to you. Stay tuned for more and as always, please continue to share your comments, feedback, and suggestions. We love improving Pine so you can write better indicators and strategies.

The fastest way to follow markets

Launch Chart