Hi!
How can I set the color of HighLowPen according to the UpCloseColor (or DownCloseColor) in a TCandleSeries ?
HighLowPen in Candle Series
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi msd48,
You can use candle's OnGetPointerStyle event like this:
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;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |