NinjaScript > Language Reference > Drawing >

BarColorSeries

Print this Topic Previous pageReturn to chapter overviewNext page

Definition

A collection of historical bar colors.

 

Property Value

A color series type object. Accessing this property via an index value [int barsAgo] returns a color structure representing the referenced bar's color.

 

Note: This will only return the color of a bar in which an explicit color overwrite was used. Otherwise it will return Color [Empty].

 

Syntax

BarColorSeries
BarColorSeries[int barsAgo]

 

 

Examples

// Sets the color of the current bar to blue.
BarColorSeries[0] = Color.Blue;

 

// Sets the color of the previous bar to orange.

BarColorSeries[1] = Color.Orange;