ChartDirector 7.0 (Perl Edition)

XYChart.addHLOCLayer3


Usage

addHLOCLayer3(highData, lowData, openData, closeData, upColor, downColor [, colorMode [, leadValue ]])

Description

Adds a multi-color high-low-open-close (HLOC) layer to the XYChart, and specify the data sets to use for drawing the layer.

ChartDirector supports drawing the HLOC symbol using different colors depending on whether the data represents an "up" day or "down" day. ChartDirector supports different definitions of what is an "up" day and "down" day, denoted using the following constants.

ConstantValueDescription
HLOCDefault0Do not distinguish between "up" and "down" days and use the same color for all HLOC symbols.
HLOCOpenClose1An up day is a day of which the closing value is on or above the opening value. This is the same definition commonly used in candlestick charts.
HLOCUpDown2An up day is a day of which the closing value is on or above the closing value of the previous day.

Arguments

ArgumentDefaultDescription
highData(Mandatory)An array of numbers representing the high values. An empty array means there is no high value data available.
lowData(Mandatory)An array of numbers representing the low values. An empty array means there is no low value data available.
openData(Mandatory)An array of numbers representing the opening values. An empty array means there is no opening value data available.
closeData(Mandatory)An array of numbers representing the closing values. An empty array means there is no closing value data available.
upColor(Mandatory)The color to be used on an "up" day.
downColor(Mandatory)The color to be used on a "down" day.
colorMode-1The method used to determine if a day is an "up" or "down". Must be one of the constants in the above table. -1 means the colorMode is automatically determine to be either HLOCDefault or HLOCUpDown, depending on whether upColor and downColor are the same or different.
leadValue[-Infinity]The lead value to act as the closing pricing before the first day, so as to determine if the first day is an "up" or "down" day.

Return Value

A HLOCLayer object representing the HLOC layer created.