Drawing / Reference
alerta.label.set_xloc
TradingView-compatible spelling: label.set_xloc, runs without warnings
Pine v6: set the label's x-coordinate and switch xloc (bar_index | bar_time) at once.
alerta.label.set_xloc(id, x, xloc) → voidParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
id | label | Yes | — | Label handle. |
x | int | Yes | — | New x value. |
xloc | string | Yes | — | xloc.bar_index | xloc.bar_time. |
Returns
voidExample
alerta.label.set_xloc
lbl = label.new(bar_index, high, "x")label.set_xloc(lbl, time, xloc.bar_time)Other signatures
label.set_xloc(id, x, xloc)Updates label X-location mode. Pine v6 can also update X and xloc together.
void
alerta.label.set_xloc
lb = label.new(bar_index, close, "Signal")label.set_xloc(lb, bar_index, xloc.bar_index)Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.