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

Drawing / Reference

alerta.polyline.set_xloc

TradingView-compatible spelling: polyline.set_xloc, runs without warnings

Pine v6: switches x-axis between bar_index and bar_time.

alerta.polyline.set_xloc(id, xloc) → void

Parameters

NameTypeRequiredDefaultDescription
idpolylineYes—Polyline handle.
xlocstringYes—xloc.bar_index | xloc.bar_time.

Returns

void

Example

alerta.polyline.set_xloc
indicator("polyline.set_xloc", overlay=true)if barstate.islast    points = array.from(chart.point.from_time(time[8], close[8]), chart.point.from_time(time[4], close[4]), chart.point.from_time(time[1], close[1]))    p = polyline.new(points, xloc=xloc.bar_time)    polyline.set_xloc(p, xloc.bar_time)

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.