NinjaScript > Language Reference > Drawing >

IRegressionChannel

Print this Topic Previous pageReturn to chapter overviewNext page

Definition
Represents an interface that exposes information regarding a Regression Channel IDrawObject.

 

Methods and Properties

StartBarsAgo

An int value representing the number of bars ago of the starting point

StartTime

A DateTime structure representing the time of the starting point

StartY

A double value representing the y value of the starting point

EndBarsAgo

An int value representing the number of bars ago of the ending point

EndTime

A DateTime structure representing the time of the ending point

EndY

A double value representing the y value of the ending point

Pen

The Pen object used to draw the middle line of the object

PenLower

The Pen object used to draw the lower line of the object

PenUpper

The Pen object used to draw the upper line of the object

PriceType

Possible values are:
 
PriceType.Close

PriceType.High

PriceType.Low

PriceType.Median

PriceType.Open

PriceType.Typical

IsStdDevType

A bool value representing if the object will use standard deviations calculations for the upper/lower lines

ExtendLeft

A bool value representing if the object will extend to the left

ExtendRight

A bool value representing if the object will extend to the right

StdDevLower

A double value representing the standard deviation distance to the lower line

StdDevUpper

A double value representing the standard deviation distance to the upper line

 

 

Examples

protected override void OnBarUpdate()
{

    // Draws a rectangle
    IRegressionChannel regression = DrawRegressionChannel("tag1", 10, 0, Color.Blue);

 

    // Print the number of bars ago the starting point is located at

    Print(regression.StartBarsAgo);
}