EasyLanguage Object Reference

Ellipse Class

Draws an ellipse of a specified size on a chart at a specified location. Appearance may altered using appropriate properties. An ellipse is a non-analytical drawing tool used to highlight specific portions of a chart.

Note that the points that define an ellipse are relative to left-side and right-side corners of an imaginary rectangle that bounds the ellipse.

The following code snippet shows how to add an ellipse to a chart at specific X-Y coordinates using XYPoint. Alternatively, the dimensions could be given using BNPoint or DTPoint.

myEllipse = Ellipse.create(XYPoint.Create(150,50),XYPoint.Create(250,100));
DrawingObjects.Add(myEllipse);

Alternatively, you can use BNPoint to draw an ellispse between specified bar numbers or DTPoint to draw between date-time positions, so that the ellipse will scroll with the bars:

If (Currentbar = 70) then		
Begin
   {draw an ellipse from the current bar to the 40th bar back}
   MyBNEllipse = Ellipse.Create(BNPoint.Create(CurrentBar + MaxBarsBack, Highest(High, 40)), BNPoint.Create(CurrentBar - 40 + MaxBarsBack, Lowest(Low, 40)));
   DrawingObjects.Add(MyBNEllipse);
End;
If (LastBarOnChart = True) then	
Begin
    {draw an ellipse from the last bar on the chart to the 50th bar ago}
    MyDTEllipse = Ellipse.Create(DTPoint.Create(BarDateTime[0], Highest(High, 50)), DTPoint.Create(BarDateTime[49], Lowest(Low, 50)));
    DrawingObjects.Add(MyDTEllipse);
End;

Properties allow custom formatting (width, style, color, etc.). In this example, the Color property (which describes line color of the rectangle, not the fill color) is inherited from DrawingObject .

myEllipse.Color = elsystem.drawing.Color.Cyan;
myEllipse.FillPattern = FillPattern.pattern1;

To use this in an analysis technique, be sure that it is setup as described in About Drawing Objects.

Namespace: elsystem.drawingobjects

[ Expand All ]
Properties

   Additional properties, methods, and events are described in the classes listed under Inheritance Hierarchy (see below).

  Name Type Description
Public property EndPoint object Gets the Ellipse object end point. See DOPoint.
Public property FillColor object Gets or sets the fill color property. See Color.
Public property FillPattern enum Gets or sets the fill pattern property using a FillPattern enumerator.
Public property StartPoint object Gets the Ellipse object start point. See DOPoint.
Public property Style enum Gets or sets the Ellipse border style using a StyleType enumerator.
Public property Weight enum Gets or sets the Ellipse border weight using a Weight enumerator.
Methods
  Name Description
Public property Create(DTPoint, DTPoint) Initializes a new instance of the Ellipse class. The first parameter is a DTPoint object representing the starting point of a hidden rectangle that contains the ellipse; the second parameter is a DTPoint object representing the end point.
Public property Create(DTPoint, DTPoint, int) Initializes a new instance of the Ellipse class. The first parameter is a DTPoint object representing the starting point of a hidden rectangle that contains the ellipse; the second parameter is a DTPoint object representing the end point, and the third parameter is an integer representing the data number (data1 - 50).
Public property Create(BNPoint, BNPoint) Initializes a new instance of the Ellipse class. The first parameter is a BNPoint object representing the starting point of a hidden rectangle that contains the ellipse; the second parameter is a BNPoint object representing the end point.
Public property Create(BNPoint, BNPoint, int) Initializes a new instance of the Ellipse class. The first parameter is a BNPoint object representing the starting point of a hidden rectangle that contains the ellipse; the second parameter is a BNPoint object representing the end point, and the third parameter is an integer representing the data number (data1 - 50).
Public property Create(XYPoint, XYPoint) Initializes a new instance of the Ellipse class. The first parameter is a XYPoint object representing the starting point of a rectangle that contains the ellipse; the second parameter is a XYPoint object representing the end point.
Public property Create(XYPoint, XYPoint, int) Initializes a new instance of the Ellipse class. The first parameter is a XYPoint object representing the starting point of a hidden rectangle that contains the ellipse; the second parameter is a XYPoint object representing the end point, and the third parameter is an integer representing the data number (data1 - 50).
Public property SetEndPoint(DTPoint) Sets the Ellipse end point using a DTPoint object.
Public property SetEndPoint(BNPoint) Sets the Ellipse end point using a BNPoint object.
Public property SetEndPoint(XYPoint) Sets the Ellipse end point using a XYPoint object.
Public property SetStartPoint(DTPoint) Sets the Ellipse start point using a DTPoint object.
Public property SetStartPoint(BNPoint) Sets the Ellipse start point using a BNPoint object.
Public property SetStartPoint(XYPoint) Sets the Ellipse start point using a XYPoint object.
Inheritance Hierarchy

elsystem.Object

  elsystem.DrawingObject

    elsystem.DrawingObjects.Ellipse