TradeZoro
Notifications

Reference

Lines

Line segments between two points.

line.copy(id)

A copy of the line.

Returns: line

ParameterType
idline

line.delete(id)

Removes the line.

Returns: nothing

ParameterType
idline

line.get_price(id, x)

The line's price at bar x.

Returns: a number

ParameterType
idline
xnum

line.get_x1(id)

First point x.

Returns: a whole number

ParameterType
idline

line.get_x2(id)

Second point x.

Returns: a whole number

ParameterType
idline

line.get_y1(id)

First point y.

Returns: a number

ParameterType
idline

line.get_y2(id)

Second point y.

Returns: a number

ParameterType
idline

line.new(x1, y1, x2, y2, xloc="bar_index", extend="none", color=na, style="solid", width=1)

Creates a line and returns its id.

Returns: line

ParameterTypeNotes
x1num
y1num
x2num
y2num
xlocstringDefault "bar_index"
extendstringDefault "none"
colorcolorDefault na
stylestringDefault "solid"
widthintDefault 1

line.set_color(id, color)

Changes the color.

Returns: nothing

ParameterType
idline
colorcolor

line.set_extend(id, extend)

Extends the line left, right, both or none.

Returns: nothing

ParameterType
idline
extendstring

line.set_style(id, style)

Changes the style.

Returns: nothing

ParameterType
idline
stylestring

line.set_width(id, width)

Changes the width.

Returns: nothing

ParameterType
idline
widthint

line.set_x1(id, x)

Moves the first point horizontally.

Returns: nothing

ParameterType
idline
xnum

line.set_x2(id, x)

Moves the second point horizontally.

Returns: nothing

ParameterType
idline
xnum

line.set_xloc(id, x1, x2, xloc)

Changes x1, x2 and how they are read.

Returns: nothing

ParameterType
idline
x1num
x2num
xlocstring

line.set_xy1(id, x, y)

Moves the first point.

Returns: nothing

ParameterType
idline
xnum
ynum

line.set_xy2(id, x, y)

Moves the second point.

Returns: nothing

ParameterType
idline
xnum
ynum

line.set_y1(id, y)

Moves the first point vertically.

Returns: nothing

ParameterType
idline
ynum

line.set_y2(id, y)

Moves the second point vertically.

Returns: nothing

ParameterType
idline
ynum

Education only. Not financial advice. Examples are teaching samples, not trading results.

Zscript is coming soon

The manual opens when Zscript launches.

Back to home