SeriesBand Tool and Functions

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Snarkle
Newbie
Newbie
Posts: 91
Joined: Wed Jun 30, 2010 12:00 am

SeriesBand Tool and Functions

Post by Snarkle » Thu Jul 15, 2010 7:40 am

Greetings,

Can the seriesBand tool be applied to functions ... for example the Bollinger Band ... It seems straight forward if you have 2 series .. but in the case of the Bollinger bands (Which will draw two lines on the Chart) is there a way to apply the SeriesBand tool to this ???

Also another quick question ... on Functions such as MACD and Bollinger Bands when I set the pen color and width only 1 of the series that is drawn has these values .. any other lines on the chart remain at defaults ... is there a way to to apply the pen colors and widths to ALL the drawn series that result from these functions.

Cheers Philip.
--------------------
Cheers Phil.

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

Re: SeriesBand Tool and Functions

Post by Yeray » Thu Jul 15, 2010 2:59 pm

Hi Philip,

Yes, you can set it manually using the Line series and the bollinger function LowBand as series and series2 for the SeriesBand tool:

Code: Select all

        private void InitializeChart()
        {
            Steema.TeeChart.Themes.BlackIsBackTheme blackTheme = new Steema.TeeChart.Themes.BlackIsBackTheme(tChart1.Chart);
            blackTheme.Apply();

            tChart1.Aspect.View3D = false;

            Steema.TeeChart.Styles.Candle candle1 = new Steema.TeeChart.Styles.Candle(tChart1.Chart);
            candle1.FillSampleValues();

            Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            Steema.TeeChart.Functions.Bollinger bollinger1 = new Steema.TeeChart.Functions.Bollinger();

            line1.DataSource = candle1;
            line1.Function = bollinger1;
            bollinger1.Period = 5;
            bollinger1.Deviation = 2;

            Steema.TeeChart.Tools.SeriesBandTool band1 = new Steema.TeeChart.Tools.SeriesBandTool(tChart1.Chart);
            band1.Transparency = 75;
            band1.Series = line1;
            band1.Series2 = bollinger1.LowBand;
        }
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

Snarkle
Newbie
Newbie
Posts: 91
Joined: Wed Jun 30, 2010 12:00 am

Re: SeriesBand Tool and Functions

Post by Snarkle » Fri Jul 16, 2010 12:08 am

Thanks that did the trick .. now I see.
--------------------
Cheers Phil.

Post Reply