addLineTool()

ICE Data Services -

addLineTool()
Drawing Functions 

The addLineTool function allows you to add various eSignal line tool objects into your chart. The supported line tool types are:
Parameter: Description:
MOB Advanced Get Make-or-Break ELLIPSE Advanced Get Ellipse HORZ Horizontal line VERT Vertical line REGRESSION Regression channel ARROW Line with arrow SEGMENT Line segment RAY Ray EXTENDED Extended line CIRCLE Circle

Line Tool Variations
addLineTool( LineTool.MOB , x , y , zone1Color , zone2Color , markerColor , name )
addLineTool( LineTool.ELLIPSE , x1 , x2 , name )
addLineTool( LineTool.HORZ , y , nThickness , Color , name )
addLineTool( LineTool.VERT , x , nThickness , Color , name )
addLineTool( LineTool.REGRESSION , x1 , x2 , nThickness , Color , name )
addLineTool( LineTool.ARROW , x1 , y1 , x2 , y2 , nThickness , Color , name )
addLineTool( LineTool.SEGMENT , x1 , y1 , x2 , y2 , nThickness , Color , name )
addLineTool( LineTool.RAY , x1 , y1 , x2 , y2 , nThickness , Color , name )
addLineTool( LineTool.EXTENDED , x1 , y1 , x2 , y2 , nThickness , Color , name )
addLineTool( LineTool.CIRCLE , x1 , y1 , x2 , y2 , nThickness , Color , name )

Code Examples

function preMain() {setPriceStudy(true);setStudyTitle("linetool");}
function main() {	var c;	if ( getCurrentBarIndex() == 0 ) {	c = close( 0 );	addLineTool(LineTool.HORZ, c, 2, Color.blue, "horzl");	addLineTool(LineTool.VERT, -34, 2, Color.blue, "vertl");	addLineTool(LineTool.ARROW, -104, c-5, -69, c-4, 2, Color.blue, "arrowl");	addLineTool(LineTool.SEGMENT, -104, c-4, -69, c-3, 2, Color.blue, "segmentl");	addLineTool(LineTool.RAY, -104, c-3, -69, c-2, 2, Color.blue, "ray");	addLineTool(LineTool.EXTENDED, -104, c-2, -69, c-1, 2, Color.blue, "extended");	addLineTool(LineTool.REGRESSION, -104, -69, 1, Color.blue, "regl");	addLineTool(LineTool.CIRCLE, -50, c, -34, c, 1, Color.blue, "circlel");	}}

See Also