Page 1 of 1

How to specify the color of candles.

Posted: Fri Nov 08, 2013 6:04 am
by 17765406
Is there any way to specify the colors of the candle?
I believe the candle has colors of green, white, red as a default setting.
I'd like to change those colors, and also can I remove a shadow of the candle?
Thank you in advance.

Re: How to specify the color of candles.

Posted: Fri Nov 08, 2013 10:18 am
by Marc
Hello,

Here's a sample snippet that shows options. At the moment the vertical stick pen colour needs to remain the same as the candlefill (unless you go into the teechart code to add a modification).

Code: Select all

function draw() {
  Chart1=new Tee.Chart("canvas");
  Chart1.title.text="Candle OHLC";
  
  var ohlc=new Tee.Candle();
  Chart1.addSeries(ohlc).addRandom(20);
 
  var hi=ohlc.higher;
  hi.fill="blue";
  hi.stroke.fill="lightgray";

  var lo=ohlc.lower;
  lo.fill="yellow";
  lo.stroke.fill="olive";
  
  ohlc.pointer.format.shadow.visible = false;

  Chart1.draw();
}
Regards,
Marc Meumann