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

# BackBrushAll

## Definition

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

## Property Value

A Brush object that represents the color of the current chart bar.

To reset the Chart background color to the default background color property, set the BackBrushAll to null for that bar.

## Syntax

BackBrushAll

You may have up to 65,535 unique BackBrushAll instances, therefore, using static predefined 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()
{
     // Sets the back color to pale green
     BackBrushAll = Brushes.PaleGreen;

     // Sets the back color to null to use the default color set in the chart properties dialog window
     BackBrushAll = null;

     // Sets the back color to pink when the closing price is less than the 20 period SMA
     // and to lime green when above (see image below)
     BackBrushAll = SMA(20)[0] >= Close[0] ? Brushes.Pink : Brushes.PaleGreen;
}
```

![MAPriceBars2](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/ninjatrader-public.docs.buildwithfern.com/5785b7e691f9e1f7a4fed279fe4152555ec0e546699329caf33d343a2568acef/docs/assets/developer/desktop-sdk/references/backbrushall-mapricebars2.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=20260729T062207Z&X-Amz-Expires=604800&X-Amz-Signature=acd11a9262ee6388525e7be28348ccd5cd21e18fbc997f70905b814eddfb2474&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)