label.new

Draws a text label at (x, y) and returns its handle. x is a bar index or a UTC ms time (xloc); y is a price, or ignored with yloc.abovebar / yloc.belowbar. The oldest labels are deleted past max_labels_count.

label.new(x: int/float, y: int/float, text: string = "", xloc: string = "bar_index", yloc: string = "price", color: color = color.blue, style: string = "label_down", textcolor: color = color.white, size: string = "normal", textalign: string = "center", tooltip: string = na, text_font_family: string = na, text_formatting: int = na, force_overlay: bool = false) -> label
label.new(point: @chart.point, text: string = "", xloc: string = "bar_index", yloc: string = "price", color: color = color.blue, style: string = "label_down", textcolor: color = color.white, size: string = "normal", textalign: string = "center", tooltip: string = na, text_font_family: string = na, text_formatting: int = na, force_overlay: bool = false) -> label

Parameters

Example

label.new(bar_index, high, str.tostring(high), style=label.style_label_down)