BarsPeriod

View as Markdown

Definition

Provides the period (interval) used for the primary Bars object on the chart.

Property Value

A NinjaTrader.Data.BarsPeriod object containing information on the period used by the Bars object on the chart.

Syntax

\<chartcontrol\>.BarsPeriod

Examples

1protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
2{
3 BarsPeriod period = chartControl.BarsPeriod;
4
5 // Print the period (interval) of the Bars object on the chart
6 Print(period);
7}

Based on the image below, BarsPeriod confirms that the primary Bars object on the chart is configured to a 5-minute interval.

ChartControl_BarsPeriod