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

# BackBrushes

## Definition

A collection of prior back brushes used for the background colors of the chart panel.

## Property Value

A brush series type object. Accessing this property via an index value `[int barsAgo]` returns a **Brush** object representing the color of the background color on the referenced bar.

## Syntax

`BackBrushes`

`BackBrushes[int barsAgo]`

You may have up to 65,535 unique BackBrushes instances, therefore, using [static predefined brushes](/developer/desktop-sdk/guides/educational-resources/working-with-brushes) should be favored. Alternatively, in order to use fewer brushes, please try to cache your custom brushes until a new brush would actually need to be created.

## Examples

```csharp
protected override void OnBarUpdate()
{
    if (CurrentBar < 1)
        return;

    // Sets the color of the background on the current bar as blue
    BackBrushes[0] = Brushes.Blue;

    // Sets the color of the background on the previous bar as orange
    BackBrushes[1] = Brushes.Orange;
}
```