BarsSinceNewTradingDay

View as Markdown

Definition

Returns the number of bars elapsed since the start of the trading day relative to the current bar processing.

Property Value

An int value representing the number of bars elapsed. This property cannot be set.

Syntax

Bars.BarsSinceNewTradingDay

Examples

1// Only process strategy logic after five bars have posted since the start of the trading day
2protected override void OnBarUpdate()
3{
4 if (Bars.BarsSinceNewTradingDay >= 5)
5 {
6 //Strategy logic here
7 }
8}