NinjaScript > Language Reference > Data > Bars >

BarsSinceSession

Print this Topic Previous pageReturn to chapter overviewNext page

Definition
The number of bars that have elapsed since the session started.
 

Property Value

An int value representing the number of bars elapsed.

 

Syntax
Bars.BarsSinceSession
 

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 CurrentBar property. Should you wish to access this property elsewhere, check for null reference first. e.g. if (Bars != null)