Forum > TAChart

TACHart - openhighlowclose / Candles - 2 series allowed?

(1/1)

Nicole:
There is a TAChart with 2 OHLCseries.
My problem: Both series are shown - but never at the same time.
If I put commentary brackets around one adding, - the other one is shown.

Any ideas how to display both series at the same time?

   
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Chart_Kontrakte.Title.Text.Text:='';   SeriesKontrakt_1.Clear;   SeriesKontrakt_2.Clear;    IBQuery_Kontrakt_1.SQL.Text:='Select first :Baranzahl skip :Laenge ID_KURSZEILEN, FK_JDATUM, FK_KONTRAKT, '+       'O, H, L, C, volume, openinterest From TBKURSZEILEN where FK_KONTRAKT = :fk '+       ' order by FK_JDATUM asc';    IBQuery_Kontrakt_1.ParamByName('Baranzahl').AsInteger:=Baranzahl; // das ist hier die abgeschnittene Baranzahl    IBQuery_Kontrakt_1.ParamByName('Laenge').AsInteger:=Laenge;    IBQuery_Kontrakt_1.ParamByName('fk').AsInteger:=id1;    IBQuery_Kontrakt_1.Active:=true;                           {  }    while not IBQuery_Kontrakt_1.EOF do begin  // zeichnet das Chart als Candles         SeriesKontrakt_1.AddXOHLC(           IBQuery_Kontrakt_1.FieldByName('FK_JDATUM').AsDateTime,           IBQuery_Kontrakt_1.FieldByName('O').AsFloat,           IBQuery_Kontrakt_1.FieldByName('H').AsFloat,           IBQuery_Kontrakt_1.FieldByName('L').AsFloat,           IBQuery_Kontrakt_1.FieldByName('C').AsFloat           );        IBQuery_Kontrakt_1.Next;                                      end;      IBQuery_Kontrakt_2.SQL.Text:='Select first :Baranzahl skip :Laenge ID_KURSZEILEN, FK_JDATUM, FK_KONTRAKT, '+       'O, H, L, C, volume, openinterest From TBKURSZEILEN where FK_KONTRAKT = :fk '+       ' order by FK_JDATUM asc';    IBQuery_Kontrakt_2.ParamByName('Baranzahl').AsInteger:=Baranzahl; // das ist hier die abgeschnittene Baranzahl    IBQuery_Kontrakt_2.ParamByName('Laenge').AsInteger:=Laenge;    IBQuery_Kontrakt_2.ParamByName('fk').AsInteger:=id1;    IBQuery_Kontrakt_2.Active:=true;     while not IBQuery_Kontrakt_2.EOF do begin  // zeichnet das Chart als Candles         SeriesKontrakt_2.AddXOHLC(           IBQuery_Kontrakt_2.FieldByName('FK_JDATUM').AsDateTime,           IBQuery_Kontrakt_2.FieldByName('O').AsFloat,           IBQuery_Kontrakt_2.FieldByName('H').AsFloat,           IBQuery_Kontrakt_2.FieldByName('L').AsFloat,           IBQuery_Kontrakt_2.FieldByName('C').AsFloat           );        IBQuery_Kontrakt_2.Next;                                      end;

wp:
I don't see any difference between both queries, neither in the fields and tablename nor in the parameter values.

The attached project demonstrates that it is no problem to overlay two OHLC series in the same chart.

Nicole:
Thank you for the project!
I recommend download for using random values and using ohlc value in the shortest way.
I kept it for my example library.

My problem is solved. 
How?
How to put it: The stupid component drew what I had asked for, - instead of what I thought of.  :-[

Navigation

[0] Message Index

Go to full version