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

# DownBrushDX

## Definition

A **SharpDX** [Brush](/developer/desktop-sdk/references/sharpdx/sharpdx-direct2d1/sharpdx-direct2d1-brush) object used to paint the down bars for the ChartStyle.

## Property  Value

A **SharpDX** [Brush](/developer/desktop-sdk/references/sharpdx/sharpdx-direct2d1) object used to paint the down bars.

## Syntax

`DownBrushDX`

## Examples

```csharp
protected override void OnRender(ChartControl chartControl, ChartScale chartScale, ChartBars chartBars)
{
   for (int idx = chartBars.FromIndex; idx <= chartBars.ToIndex; idx++)
       {
           double     closeValue             = bars.GetClose(idx); 
           double     openValue               = bars.GetOpen(idx);
 
           // Set the brush of the current candle to UpBrushDX or DownBrushDX, depending on the 
           // bar direction
           Brush brush = closeValue >= openValue ? UpBrushDX : DownBrushDX;
       }
}
```