> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# BarsPeriod

## 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

```csharp
protected override void OnRender(ChartControl chartControl, ChartScale chartScale) 
{
   BarsPeriod period = chartControl.BarsPeriod;
 
   // Print the period (interval) of the Bars object on the chart
   Print(period);
}
```

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

![ChartControl\_BarsPeriod](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/99897a286e53ee82db1b926548e12b95a9941d99903d7d2c14bbebf72ed7c677/docs/assets/developer/desktop-sdk/references/chartcontrol-barsperiod-chartcontrol-barsperiod.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260729%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260729T062240Z&X-Amz-Expires=604800&X-Amz-Signature=bf20f205b056d61923e7479e73f90e48da6f03485ea72c5548c31a1774f533c9&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)