NinjaScript > Language Reference > Drawing >

IRay

Print this Topic Previous pageReturn to chapter overviewNext page

Definition
Represents an interface that exposes information regarding a Ray 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

Pen

The Pen object used to draw the object

 

 

Examples

protected override void OnBarUpdate()
{

    // Draws a ray
    IRay ray = DrawRay("tag1", 10, 1000, 0, 1001, Color.LimeGreen);

 

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

    Print(ray.Anchor2BarsAgo);
}