ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  (Q) candleStickLayer set color
Posted by cha on Apr-17-2017 19:11
hi there

There is no Set Color Option for "open = close"

open 200 close 300 = (body and line) color is red (OK)
open 200 close 100 = (body and line) color is blue (OK)
open 200 close 200 = (body and line) color is black <-- How to ???

thx

  Re: (Q) candleStickLayer set color
Posted by Peter Kwan on Apr-18-2017 03:24
Hi cha,

In ChartDirector, "close >= open" is an "up day", otherwise it is a down day.

if open 200 close 200, the candlestick body will be filled with the "red color". However, the candlestick body is zero in height, so you cannot see the fill color. Instead, you see the border color, which by default is black for all the candlesticks.

You can use CandleStickLayer.setColors to modify the color of the border. See:

http://www.advsofteng.com/doc/cdcpp.htm#CandleStickLayer.setColors.htm

An example in C++ is like:

myCandleStickLayer->setColors(0x00ff00, 0x00ff00, 0xff0000, 0xff0000);

Hope this can help.

Regards
Peter Kwan

  Re: (Q) candleStickLayer set color
Posted by cha on Apr-19-2017 06:53
hi Peter

Is it impossible to set the color to black if the open and the close price are the same?

thx

  Re: (Q) candleStickLayer set color
Posted by Peter Kwan on Apr-20-2017 01:18
Attachments:
Hi cha,

Yes, I think the default in ChartDirector is to set the color to black when the open and close price are the same. See:

The image below is from the "Candlestick Chart" sample code included in ChartDirector. Note the last candlestick in the above chart. It is black.

Regards
Peter Kwan
candlestick.png