NinjaScript > Language Reference > Drawing >

IDrawObject

Print this Topic Previous pageReturn to chapter overviewNext page

Definition
Represents an interface that exposes information regarding a draw object.

 

Methods and Properties

AutoScale

A bool value representing if the draw object will be included in the y-axis scale

DrawType

Possible values are:

 

DrawType.AndrewsPitchfork

DrawType.Arc

DrawType.ArrowDown

DrawType.Line

DrawType.Up

DrawType.Diamond

DrawType.Dot

DrawType.Ellipse

DrawType.ExtendedLine

DrawType.FibonacciCircle

DrawType.FibonacciExtensions

DrawType.FibonacciRetracements

DrawType.FibonacciTimeExtensions

DrawType.GannFan

DrawType.HorizontalLine

DrawType.Line

DrawType.Ray

DrawType.Rectangle

DrawType.Region

DrawType.RegressionChannel

DrawType.Ruler

DrawType.Square

DrawType.Text

DrawType.TextFixed

DrawType.TrendChannel

DrawType.TriangleDown

DrawType.TriangleUp

DrawType.VerticalLine

Locked

A bool value representing if the draw object can be manually moved on the chart

SeparateZOrder

A bool value representing if the draw object is on the same Z-order as the NinjaScript

Tag

A string value representing the unique ID of the draw object. Global draw objects will have an "@" added as a prefix to the string.

ToString()

A string value representing the draw object

UserDrawn

A bool value representing if the draw object was manually drawn as opposed to programmatically drawn

 

 

Examples

protected override void OnBarUpdate()

{

 // Loops through the DrawObjects collection

 foreach (IDrawObject draw in DrawObjects)

 {

         // Unlocks all draw objects for manual manipulation on the chart

         draw.Locked = false;

 }

}