I need to access date, open,high,low,volume values (TCandleSeries) & date, volume (TVolume Series) and also from various functions for display purposes. Am having type compatibility problems.
Could somebody guide me to a routine/module as to how I could retrieve these and be able to display in say a stringgrid. I am unable to find any example which roughly corresponds to a data window for the above different series.
Will appreciate a quicjk response.
Satish
Data Retrieval from TCandleSeries/TVolume
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hello Satish,
You can do something similar to:
Where Series1 is a TCandleSeries and Series2 is a TVolumeSeries.
You may also be interested in using a TChartGrid component.
You can do something similar to:
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
var
i,j: integer;
sc, sv: String;
begin
for i:=0 to Chart1.SeriesCount-1 do
Chart1.Series[i].FillSampleValues();
for j:=0 to Series1.Count -1 do
begin
sc:='Date: '+DateToStr(FloatToDateTime(Series1.DateValues[j]));
sc:=sc+', Open: '+FloatToStr(Series1.OpenValues[j]);
sc:=sc+', High: '+FloatToStr(Series1.HighValues[j]);
sc:=sc+', Low: '+FloatToStr(Series1.LowValues[j]);
sc:=sc+', Volume: '+FloatToStr(Series2.YValues[j]);
sv:='Date: '+DateToStr(FloatToDateTime(Series2.XValues[j]));
sv:=sv+', Volume: '+FloatToStr(Series2.YValues[j]);
Memo1.Lines.Add(sc);
Memo2.Lines.Add(sv);
end;
end;
You may also be interested in using a TChartGrid component.
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 |