ChartDirector 6.0 (Perl Edition)

CandleStickLayer.setExtraColors


Usage

setExtraColors(upDownFillColor, upDownLineColor, downDownFillColor, downDownLineColor [, leadValue ])

Description

Configures additional colors for candlesticks.

The standard way to color a candlestick is to color it using the method as mentioned in CandleStickLayer.setColors, in which "up" is defined as the closing price higher than or equal to the opening price.

In some applications, it may be desirable to vary the candlestick colors based on an alternative definition of "up" and "down", in which "up" is defined as the closing price higher than or equal to that of the previous trading session.

With these two definitions of "up" and "down", a candlestick can have 4 states. It can be "up/up" ("up" as according to both the standard and alternative definitions), "up/down" ("up" according to the standard definition, "down" according to the alternative definition), "down/up" or "down/down".

The setExtraColors method can be used to configure the "up/down" and "down/down" colors. If this method is used, the colors configured with CandleStickLayer.setColors will be considered as the "up/up" and "down/up" colors.

Arguments

ArgumentDefaultDescription
upDownFillColor(Mandatory)The fill color for "up/down" days.
upDownLineColor(Mandatory)The line color for "up/down" days.
downDownFillColor(Mandatory)The fill color for "down/down" days.
downDownLineColor(Mandatory)The line color for "down/down" days.
leadValue[-Infinity]The closing price before the first trading session, which is used to determine if the first trading session is "up" or "down" according to the alternative definition.

Return Value

None