Skip to content

polyline

Properties

all

Type: series array<polyline>

Returns an array filled with all the current polylines drawn by the script.

Functions

new

pine
polyline.new(
    series array<chart.point> points,
    series bool curved = false,
    series bool closed = false,
    series string xloc = xloc.bar_index,
    series color line_color = color.blue,
    series color fill_color = na,
    series string line_style = line.style_solid,
    series int line_width = 1,
    series bool force_overlay = false
  ) → series polyline

Creates a new polyline instance and displays it on the chart, sequentially connecting all of the points in the points array with line segments.

The segments in the drawing can be straight or curved depending on the curved parameter.

Parameters

NameTypeDefaultDescription
pointsseries array<chart.point>
curvedseries boolfalse
closedseries boolfalse
xlocseries stringxloc.bar_index
line_colorseries colorcolor.blue
fill_colorseries colorna
line_styleseries stringline.style_solid
line_widthseries int1
force_overlayseries boolfalse

Returns: series polyline

Methods

delete

pine
polyline.delete(series polyline id)

Deletes the specified polyline from the chart.

Parameters

NameTypeDefaultDescription
idseries polyline

基于 MIT 许可证发布。