EasyLanguage Object Reference

About Drawing Object Classes

The EasyLanguage drawing object classes allow you to create drawing objects on a chart from your analysis technique and to programmatically manage their appearance and position. The trendline and text objects parallel the functionality of the legacy EasyLanguage TL_xxx and Text_xxx reserved words. The Ellipse, HorizontalLine, Rectangle, and Vertical line objects are equivalent to the drawing tools you were able to manually insert in a chart.

[ Expand All ]
EasyLanguage Drawing Objects

Drawing Object Classes

Point Classes

Adding Drawing Objects to your EasyLanguage Code

   To use EasyLanguage drawing objects, you should have the following elements:  

using  elsystem.drawingobjects;
using	elsystem;
vars:	HorizontalLine myHorizLine1(null),	// declare myHorizLine1 as a HorizontalLine type
	TrendLine myTrendLine1(null),		// declare myTrendLine1 as a TrendLine type
       BNPoint BNPoint1(null), BNPoint BNPoint2(null);	// declare bar number points 1 & 2
myHorizLine1 = HorizontalLine.Create(last-.02);		// create a horizontal line at .02 below the last price
myPoint1 = BNPoint.Create(barnumber-10,close[10]);	// create first trendline point 10 bars to the left of the current bar
myPoint2 = BNPoint.Create(barnumber,close);		// create second trendline point at current bar
myTrendLine1 = TrendLine.Create(myPoint1,myPoint2 );	// create a trend line and assign it to myTrendLine

(Note that you can also create the above trendline without needing to define BNPoint objects by directly specifying the BNPoint values when creating the trendline instance)

    myTrendLine1 = TrendLine.Create(BNPoint.Create(barnumber-10,close[10]),BNPoint.Create(barnumber,close));
myHorizLine1.Click += DOClick;
myTrendLine1.Click += DOClick;
method	void DOClick( Object sender,DrawingObjectEventArgs args)
	// Your EasyLanguage code to handle a drawing object that has been clicked
Alerts with Drawing Objects

You can set alerts for TrendLine, HorizontalLine, and VerticalLine drawing objects so that they will notify you when specified alert criteria occur.

Refer to Using Alert with Drawing Objects for more information and examples.

Inheritance Hierarchy