Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.label.set_xloc
On this pageSignatureParametersReturnsExample

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) → void

Parameters

NameTypeRequiredDefaultDescription
idlabelYes—Label handle.
xintYes—New x value.
xlocstringYes—xloc.bar_index | xloc.bar_time.

Returns

void

Example

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.

AlertaScript

No results found.

Search by name, alias, or keyword.