public CumUp(DataSeries source, int period, string description) public static CumUp Series(WealthLab.DataSeries source, int period) public static double Value(int bar, DataSeries source, 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 { // Thank you fundtimer public Color WS4ColorToNET( double WS4Color ) { return Color.FromArgb( (int)Math.Floor( ( WS4Color % 1000 ) / 100 * 28.4 ), (int)Math.Floor( ( WS4Color % 100 ) / 10 * 28.4 ), (int)Math.Floor( WS4Color % 10 * 28.4 ) ); } protected override void Execute() { // Highlight extreme moves up double n = 0; for(int bar = 0; bar < Bars.Count; bar++) { n = Math.Truncate( CumUp.Series( Close, 3 )[bar] ); if( n > 9 ) n = 9; SetBarColor( bar, WS4ColorToNET( n*10 ) ); } } } }