public static DIPlus Series(Bars bars, int period)
using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators;namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { // Flag bars with dotted lines when DI+ is above 40 ChartPane ADXPane = CreatePane( 50, true, true ); PlotSeries( ADXPane, DIPlus.Series( Bars, 14 ), Color.Green, LineStyle.Solid, 2 ); // DIPlus and DIMinus require stabilizing so start the bar count 3 to 4 times their period for(int bar = 50; bar < Bars.Count; bar++) { if( DIPlus.Series( Bars, 14 )[bar] > 40 ) DrawLine( PricePane, bar, Low[bar], bar, 0, Color.Green, LineStyle.Dotted, 2 ); } } } }