polyline
Lines through many points.
#Functions
#polyline.deletefunction
Removes the polyline.
polyline.delete(id: polyline)| Parameter | Type | Description |
|---|---|---|
id | polyline | The array. |
Example
const pts = array.from(chart.point.now(low), chart.point.now(high))
const pl = polyline.new(pts)
pl.delete()Since ChartScript 1
#polyline.newfunction
A line through up to 10,000 chart.points (curved, closed and filled if asked). The oldest is removed past max_polylines_count.
polyline.new(points: array<point>, { curved?: bool = false, closed?: bool = false, xloc?: simple string = xloc.bar_index, line_color?: color = color.blue, fill_color?: color = na, line_style?: string = line.style_solid, line_width?: int = 1, force_overlay?: const bool = false, look?: const string = "" }): polyline| Parameter | Type | Description |
|---|---|---|
points | array<point> | The points. |
curved | booldefault false | The curved. |
closed | booldefault false | The closed. |
xloc | simple stringdefault xloc.bar_index | The xloc. |
line_color | colordefault color.blue | The line color. |
fill_color | colordefault na | The fill color. |
line_style | stringdefault line.style_solid | The line style. |
line_width | intdefault 1 | The line width. |
force_overlay | const booldefault false | Accepted and ignored in this version. |
look | const stringdefault "" | The look. |
Returns polyline.
Example
const pts = array.from(chart.point.from_index(bar_index - 2, low), chart.point.now(high))
const pl = polyline.new(pts)Since ChartScript 1
#Variables
#polyline.allvariable
Every polyline of the script that still exists.
polyline.all: array<polyline>Type series array<polyline>.
Example
const n = array.size(polyline.all)Since ChartScript 1