Lines reference
The 21 functions and 1 value of line: signature, effects, phase, cost and tested examples.
Lines drawn between two points on the chart. A line is made with line.new, and the other functions read or change it.
Functions#
line.copy#
line.copy([line])
Makes a copy.
- Effects: draws on the chart or writes an output; builds a new value whose size follows its arguments (counted in the memory ledger).
- Phase: every bar.
- Cost: allocates: the memory ledger counts what it builds; counts against the limits on drawn objects and outputs.
line.delete#
line.delete([line])
Removes the object from the chart.
- Effects: draws on the chart or writes an output.
- Phase: every bar.
- Cost: counts against the limits on drawn objects and outputs.
line.get_price#
line.get_price([line], [x])
Reads the price of the object.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
line.get_x1#
line.get_x1([line])
Reads the x1 of the object.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
line.get_x2#
line.get_x2([line])
Reads the x2 of the object.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
line.get_y1#
line.get_y1([line])
Reads the y1 of the object.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
line.get_y2#
line.get_y2([line])
Reads the y2 of the object.
- Effects: none: the result depends on the arguments only.
- Phase: every bar.
- Cost: a fixed number of operations.
line.new#
line.new(x1, y1, [x2], [y2], [x_unit], [extend], [color], [style], [width], [first_point], [second_point])
Draws a line between two points and gives a handle to change or delete it.
- Effects: draws on the chart or writes an output; builds a new value whose size follows its arguments (counted in the memory ledger).
- Phase: every bar.
- Cost: allocates: the memory ledger counts what it builds; counts against the limits on drawn objects and outputs.
- Returns: a line.
- Examples: Recent range drawing, Levels from text.
line.set_color#
line.set_color([line], [color])
Changes the color of the object.
- Effects: draws on the chart or writes an output.
- Phase: every bar.
- Cost: counts against the limits on drawn objects and outputs.
line.set_extend#
line.set_extend([line], [extend])
Changes the extend of the object.
- Effects: draws on the chart or writes an output.
- Phase: every bar.
- Cost: counts against the limits on drawn objects and outputs.
line.set_first_point#
line.set_first_point([line], [point])
Changes the first point of the object.
- Effects: draws on the chart or writes an output.
- Phase: every bar.
- Cost: counts against the limits on drawn objects and outputs.
line.set_second_point#
line.set_second_point([line], [point])
Changes the second point of the object.
- Effects: draws on the chart or writes an output.
- Phase: every bar.
- Cost: counts against the limits on drawn objects and outputs.
line.set_style#
line.set_style([line], [style])
Changes the style of the object.
- Effects: draws on the chart or writes an output.
- Phase: every bar.
- Cost: counts against the limits on drawn objects and outputs.
line.set_width#
line.set_width([line], [width])
Changes the width of the object.
- Effects: draws on the chart or writes an output.
- Phase: every bar.
- Cost: counts against the limits on drawn objects and outputs.
line.set_x1#
line.set_x1([line], [x])
Changes the x1 of the object.
- Effects: draws on the chart or writes an output.
- Phase: every bar.
- Cost: counts against the limits on drawn objects and outputs.
line.set_x2#
line.set_x2([line], [x])
Changes the x2 of the object.
- Effects: draws on the chart or writes an output.
- Phase: every bar.
- Cost: counts against the limits on drawn objects and outputs.
line.set_x_unit#
line.set_x_unit([line], [x1], [x2], [x_unit])
Changes the x unit of the object.
- Effects: draws on the chart or writes an output.
- Phase: every bar.
- Cost: counts against the limits on drawn objects and outputs.
line.set_xy1#
line.set_xy1([line], [x], [y])
Changes the xy1 of the object.
- Effects: draws on the chart or writes an output.
- Phase: every bar.
- Cost: counts against the limits on drawn objects and outputs.
line.set_xy2#
line.set_xy2([line], [x], [y])
Changes the xy2 of the object.
- Effects: draws on the chart or writes an output.
- Phase: every bar.
- Cost: counts against the limits on drawn objects and outputs.
line.set_y1#
line.set_y1([line], [y])
Changes the y1 of the object.
- Effects: draws on the chart or writes an output.
- Phase: every bar.
- Cost: counts against the limits on drawn objects and outputs.
line.set_y2#
line.set_y2([line], [y])
Changes the y2 of the object.
- Effects: draws on the chart or writes an output.
- Phase: every bar.
- Cost: counts against the limits on drawn objects and outputs.
Values#
line.all