NinjaScript > Language Reference > Drawing >

ITriangle

Print this Topic Previous pageReturn to chapter overviewNext page

Definition
Represents an interface that exposes information regarding a Triangle IDrawObject.

 

Methods and Properties

Anchor1BarsAgo

An int value representing the number of bars ago of the 1st anchor point

Anchor1Time

A DateTime structure representing the time of the 1st anchor point

Anchor1Y

A double value representing the y value of the 1st anchor point

Anchor2BarsAgo

An int value representing the number of bars ago of the 2nd anchor point

Anchor2Time

A DateTime structure representing the time of the 2nd anchor point

Anchor2Y

A double value representing the y value of the 2nd anchor point

Anchor3BarsAgo

An int value representing the number of bars ago of the 3rd anchor point

Anchor3Time

A DateTime structure representing the time of the 3rd anchor point

Anchor3Y

A double value representing the y value of the 3rd anchor point

AreaColor

A Color structure representing the fill color of the draw object

AreaOpacity

An int value representing the opacity of the area color

Pen

The Pen object used to draw the object

 

 

Examples

protected override void OnBarUpdate()
{

    // Draws a Triangle
    ITriangle tri = DrawTriangle("tag1", 4, Low[4], 3, High[3], 1, Low[1], Color.Blue);

 

    // Print the number of bars ago the first anchor point is located at

    Print(tri.Anchor1BarsAgo);
}