public BBandUpper2(DataSeries source, int period, double stdDevs, StdDevCalculation sd, string description) public static BBandUpper2 Series(DataSeries source, int period, double stdDevs, StdDevCalculation sd)
using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators; using Community.Indicators;namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { PlotSeries( PricePane, BBandUpper2.Series( Close, 20, 2.00, StdDevCalculation.Sample ), Color.DarkBlue, LineStyle.Solid, 2 ); // Flag bars that have penetrated the upper BBand calculated using the Sample method for(int bar = 20; bar < Bars.Count; bar++) { if( Bars.Highbar > BBandUpper2.Series( Close, 20, 2.0, StdDevCalculation.Sample )bar ) SetBarColor( bar, Color.DeepPink); } } } }