public MomentumPct(DataSeries source, int period, string description) public static MomentumPct Series(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 { protected override void Execute() { // Duplicate the MomentumPctSeries calculation int Period = 20; DataSeries hTmp = ( Close >> Period ); DataSeries hMomPct = ( Close/hTmp ) * 100; ChartPane MomPctPane = CreatePane( 30, true, true ); PlotSeries( MomPctPane, hMomPct, Color.Red, WealthLab.LineStyle.Solid, 2 ); PlotSeries( MomPctPane, MomentumPct.Series( Close, Period ), Color.Black, WealthLab.LineStyle.Solid, 2 ); } } }