Page 1 of 1

8.04 Bug Report - Bollinger bands

Posted: Tue Oct 28, 2008 6:45 pm
by 10549714
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

Bollinger bands

Posted: Thu Oct 30, 2008 9:41 am
by 10549714
Why am I not getting any replies?

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

Posted: Thu Oct 30, 2008 10:18 am
by narcis
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.

Posted: Thu Oct 30, 2008 10:21 am
by 10549714
Thanks NarcĂ­s

Didn't realise there was a holiday

Awaiting your reply on the main issue following your investigation

BRgds,
Marius

Posted: Mon Nov 03, 2008 11:42 am
by Pep
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;