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

# FirstTimePainted

## Definition

Indicates a **DateTime** value of the first bar painted on the chart.

**FirstTimePainted** provides the timestamp of the first bar, NOT the time at which the bar was painted. For example, if a chart was opened and historical bars drawn on August 2nd at 5:00 pm, but the first bar on the chart is painted at a time-axis value of July 31st at 1:00 am, then **FirstTimePainted** will return the July 31st date and time.

## Property Value

A **DateTime** object containing information on the timestamp of the first bar of the chart.

## Syntax

`\<chartcontrol\>.FirstTimePainted`

## Examples

```csharp
protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
{
    // Draw text to display the first timestamp of a bar on the chart
    Draw.Text(this, "firstTimeText", String.Format("The first bar of {0} is drawn at {1}", Instrument.MasterInstrument.Name, chartControl.FirstTimePainted), 1, High[0],Brushes.Black);
}
```

In the image below, **FirstTimePainted** reveals that the first painted slot corresponds to 8/12/17 at 10:40:00 AM.

![ChartControl\_FirstTimePainted](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/ad5a7be3daab939a24af62bf8af889c5d5fac661510a7288a2d2a6aca539fbd1/docs/assets/developer/desktop-sdk/references/firsttimepainted-chartcontrol-firsttimepainted.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=20260729T070510Z&X-Amz-Expires=604800&X-Amz-Signature=d35ae1cef294d9a0e9460f0d8e4c817fb4a4cf690d7b7e65b343c666b3e1c23c&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)