TickCount
Previous Topic  Next Topic 

Definition

The total number of ticks of the current bar.


Property Value

A int value that represents the total number of ticks of the current bar.


Syntax

Bars.TickCount


Property Of

Custom Indicator, Custom Strategy


Examples

// Prints the tick count to the output window
Print("The tick count of the current bar is " + Bars.TickCount.ToString());


Additional Access Information
This property can be accessed without a null reference check in the OnBarUpdate() event handler. When the OnBarUpdate() event is triggered, there will always be a Bar object which holds the TickCount property. Should you wish to access this property elsewhere, check for null reference first. e.g. if (Bars != null)