NinjaScript > Language Reference > Drawing >
IDiamond
Definition Represents an interface that exposes information regarding a Diamond IDrawObject.
Methods and Properties
BarsAgo
An int value representing the number of bars ago of the draw object
Color
A Color structure representing the color of the draw object
Time
A DateTime structure representing the time of the draw object
Y
An int value representing the y value of the draw object
Examples
protected override void OnBarUpdate() {
// Draws a diamond IDiamond diamond = DrawDiamond("tag1", true, 0, Low[0] - TickSize, Color.Red);
// Print the number of bars ago of the draw object
Print(diamond.BarsAgo); }