Page 1 of 1

HighLowPen in Candle Series

Posted: Thu Aug 28, 2008 7:24 am
by 10547029
Hi!

How can I set the color of HighLowPen according to the UpCloseColor (or DownCloseColor) in a TCandleSeries ?

Posted: Thu Aug 28, 2008 9:21 am
by narcis
Hi msd48,

You can use candle's OnGetPointerStyle event like this:

Code: Select all

function TForm1.Series1GetPointerStyle(Sender: TChartSeries;
  ValueIndex: Integer): TSeriesPointerStyle;
begin
  Series1.HighLowPen.Color := Series1.DownCloseColor;

  if (ValueIndex>0) then
  begin
    if Series1.CloseValues[ValueIndex] > Series1.CloseValues[ValueIndex-1] then
      Series1.HighLowPen.Color := Series1.UpCloseColor;
  end;

  result:=psRectangle;
end;

Posted: Fri Aug 29, 2008 5:51 am
by 10547029
Hi NarcĂ­s,

Thanks for help.
Question is closed.