NinjaScript > Language Reference > Drawing >
IRegion
Definition Represents an interface that exposes information regarding a Region 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
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
AreaOpacity
An int value representing the opacity of the area color
AreaColor
A Color structure representing the fill color of the draw object
Pen
The Pen object used to draw the object
Y
A double representing a y-value the draw object is drawn to
Examples
protected override void OnBarUpdate() {
// Draws a region IRegion region = DrawRegion("tag1", CurrentBar, 0, Bollinger(2, 14).Upper, Bollinger(2, 14).Lower, Color.Empty, Color.Lime, 2);
// Print the number of bars ago the starting point is located at
Print(region.StartBarsAgo); }