MACD & ADX - 'Active := false', has no effect.

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Phineas
Newbie
Newbie
Posts: 18
Joined: Wed Apr 09, 2008 12:00 am

MACD & ADX - 'Active := false', has no effect.

Post by Phineas » Thu Jun 19, 2008 7:48 pm

Hi guys; thanks for your previous help. I have a problem with hiding and showing the MACD & ADX Function Series.

The following work fine:

Stochasticseries.Active := false;
RSIseries.Active := false;

All the financial functions behave appropriately. They dissappear off the chart when ACTIVE := false, and return with setting ACTIVE := true;

BUT NOT so with the MACD & ADS function series. I guess this has to do with these functions each being comprised of more than one series.

How do I get the MACD & ADX functions to completley dissappear and reappear when I want? Setting ACTIVE has no effect on them. I don't want to free them and replot them.

Thanks.

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Fri Jun 20, 2008 8:26 am

Hi Phineas,

As you can see in MACD demo in All features/Functions/Financial, when you add the function, a Line series and a function are created. And inside the function there are two series. So you'll have to deactivate all this series. And the same happens to ADX function. An example will be more descriptive:

Code: Select all

type
  TForm1 = class(TForm)
    Chart1: TChart;

    Series1: TCandleSeries;  //our source

    Series2: TLineSeries;    //our ADX function
    TeeFunction1: TADXFunction;

    Series3: TLineSeries;    //our MACD function
    TeeFunction2: TMACDFunction;

    CheckBox1: TCheckBox;
    procedure CheckBox1Click(Sender: TObject);

//...

procedure TForm1.CheckBox1Click(Sender: TObject);
begin
  Series2.Active := CheckBox1.Checked;
  TeeFunction1.DMDown.Active := Series2.Active;
  TeeFunction1.DMUp.Active := Series2.Active;

  Series3.Active := CheckBox1.Checked;
  TeeFunction2.MACDExp.Active := Series3.Active;
  TeeFunction2.Histogram.Active := Series3.Active;
end;
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply