Drawing / Reference
alerta.polyline.set_closed
TradingView-compatible spelling: polyline.set_closed, runs without warnings
Pine v6: when true, the polyline closes back to its first point.
alerta.polyline.set_closed(id, closed) → voidParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
id | polyline | Yes | — | Polyline handle. |
closed | bool | Yes | — | Close the path. |
Returns
voidExample
alerta.polyline.set_closed
indicator("polyline.set_closed", 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_closed(p, true)Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.