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) → voidParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
id | polyline | Yes | — | Polyline handle. |
xloc | string | Yes | — | xloc.bar_index | xloc.bar_time. |
Returns
voidExample
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.