8.04 Bug Report - Bollinger bands

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Marius
Newbie
Newbie
Posts: 28
Joined: Tue Jul 29, 2008 12:00 am

8.04 Bug Report - Bollinger bands

Post by Marius » Tue Oct 28, 2008 6:45 pm

I get an invalid pointer operation when using a Bollinger band in my chart. I've been able to reproduce it by creating a new application and dropping an empty TCHart on it. Then in FormCreate I add the following

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var
  Line       : TLineSeries;
  Bollinger1 : TLineSeries;
begin
  Line := TLineSeries.Create(Chart1);
  Line.FillSampleValues(100);

  Bollinger1 := TLineSeries.Create(Chart1);
  Bollinger1.SetFunction(TBollingerFunction.Create(Chart1));
  Bollinger1.DataSources.Clear;
  Bollinger1.DataSources.Add(Line);

  Chart1.AddSeries(Line);
  Chart1.AddSeries(Bollinger1);
end;
Run the app. It displays fine but when I close the app it throws the exception.

Can someone please verify that my code is correct..

BRgds,
Marius

Marius
Newbie
Newbie
Posts: 28
Joined: Tue Jul 29, 2008 12:00 am

Bollinger bands

Post by Marius » Thu Oct 30, 2008 9:41 am

Why am I not getting any replies?

Is this not the place to go for support on TChart?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Oct 30, 2008 10:18 am

Hi Marius,

Yes, this is the place to receive support with TeeChart. We didn't reply earlier because, as you can see in our public holidays calendar, yesterday was a local holiday.

Regarding your technical inquiry, we have been able to reproduce the issue here. We found that doing the same using the chart editor works fine. We will need some time to investigate which is the problem here and will get back to you when we have further news.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Marius
Newbie
Newbie
Posts: 28
Joined: Tue Jul 29, 2008 12:00 am

Post by Marius » Thu Oct 30, 2008 10:21 am

Thanks Narcís

Didn't realise there was a holiday

Awaiting your reply on the main issue following your investigation

BRgds,
Marius

Pep
Site Admin
Site Admin
Posts: 3299
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Nov 03, 2008 11:42 am

Hello Marius,

basically, the problem is the lines order. Using the same code, but changing a little bit the order should work fine :

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var
  Line       : TLineSeries;
  Bollinger1 : TLineSeries;
begin
  Line := TLineSeries.Create(Chart1);
  Line.FillSampleValues(100);
  Chart1.AddSeries(Line);

  Bollinger1 := TLineSeries.Create(Chart1);
  Chart1.AddSeries(Bollinger1);
  Bollinger1.SetFunction(TBollingerFunction.Create(Chart1));

  Bollinger1.DataSources.Clear;
  Bollinger1.DataSources.Add(Line);
end;

Post Reply