NinjaScript > Language Reference > Drawing >

DrawEllipse()

Print this Topic Previous pageReturn to chapter overviewNext page

Definition
Draws an ellipse.

 

Method Return Value

An IEllipse object that represents the draw object.

 

Syntax

DrawEllipse(string tag, int startBarsAgo, double startY, int endBarsAgo, double endY, Color color)
DrawEllipse(string tag, bool autoScale, int startBarsAgo, double startY, int endBarsAgo, double endY, Color color, Color areaColor, int areaOpacity)

DrawEllipse(string tag, bool autoScale, DateTime startTime, double startY, DateTime endTime, double endY, Color color, Color areaColor, int areaOpacity)

 

Parameters

tag

A user defined unique id used to reference the draw object. For example, if you pass in a value of "myTag", each time this tag is used, the same draw object is modified. If unique tags are used each time, a new draw object will be created each time.

autoScale

Determines if the draw object will be included in the y-axis scale. Default value is false.

startBarsAgo

The starting bar (x axis co-ordinate) where the draw object will be drawn. For example, a value of 10 would paint the draw object 10 bars back

startTime

The starting time where the draw object will be drawn

startY

The starting y value co-ordinate where the draw object will be drawn

endBarsAgo

The end bar (x axis co-ordinate) where the draw object will terminate

endTime

The end time where the draw object will terminate

endY

The end y value co-ordinate where the draw object will terminate

color

The draw object color (reference)

areaColor

The fill color for the object (reference)

areaOpacity

Sets the level of transparency for the fill color. Valid values between 0 - 10. (0 = completely transparent, 10 = no opacity)

 

 

Examples

// Paints a red ellipse on the current bar
DrawEllipse("tag1", true, 5, Close[5], 0, Close[0], Color.Red, Color.Red, 5);