DownBrushDX

View as Markdown

Definition

A SharpDX Brush object used to paint the down bars for the ChartStyle.

Property Value

A SharpDX Brush object used to paint the down bars.

Syntax

DownBrushDX

Examples

1protected override void OnRender(ChartControl chartControl, ChartScale chartScale, ChartBars chartBars)
2{
3 for (int idx = chartBars.FromIndex; idx <= chartBars.ToIndex; idx++)
4 {
5 double closeValue = bars.GetClose(idx);
6 double openValue = bars.GetOpen(idx);
7
8 // Set the brush of the current candle to UpBrushDX or DownBrushDX, depending on the
9 // bar direction
10 Brush brush = closeValue >= openValue ? UpBrushDX : DownBrushDX;
11 }
12}