NinjaScript > Language Reference > Data > Bars >

FirstBarOfSession

Print this Topic Previous pageReturn to chapter overviewNext page

Definition
Gets a value indicating if the bar is the first bar of a session.
 

Property Value

This property returns true if the bar is the first bar of a session; otherwise, false.

 

Syntax
Bars.FirstBarOfSession

 

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