public CCI(WealthLab.Bars bars, int period, string description) public static WealthLab.Indicators.CCI Series(WealthLab.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() { // Color bars oversold/overbought based on CCI level DataSeries cci = CCI.Series( Bars, 10 ); ChartPane CCIPane = CreatePane( 40, true, true ); PlotSeries( CCIPane, cci, Color.Purple, LineStyle.Histogram, 3 ); SetBarColors( Color.Silver, Color.Silver ); for(int bar = 10; bar < Bars.Count; bar++) { if( cci[bar] > 100 ) SetBarColor( bar, Color.Red ); else if( cci[bar] < -100 ) SetBarColor( bar, Color.Green ); } } } }