NinjaScript > Language Reference > Drawing >
ITrendChannel
Definition Represents an interface that exposes information regarding a Trend Channel 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
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
Examples
protected override void OnBarUpdate() {
// Draws a Trend Channel ITrendChannel trendChannel = DrawTrendChannel("tag1", true, 10, Low[10], 0, High[0], 10, High[10] + 5 * TickSize);
// Print the number of bars ago the first anchor point is located at
Print(trendChannel.Anchor1BarsAgo); }