using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators; using TASCIndicators;namespace WealthLab.Strategies { public class MyStrategy : WealthScript { private StrategyParameter paramDailyLength1; private StrategyParameter paramDailyLength2; private StrategyParameter paramWeeklyLength1; private StrategyParameter paramWeeklyLength2; public MyStrategy() { paramDailyLength1 = CreateParameter("Daily Length 1",12,2,300,20); paramDailyLength2 = CreateParameter("Daily Length 2",26,2,300,20); paramWeeklyLength1 = CreateParameter("Weekly Length 1",60,2,300,20); paramWeeklyLength2 = CreateParameter("Weekly Length 2",130,2,300,20); } protected override void Execute() { var RDM = RelativeDailyPPO.Series(Close,paramDailyLength1.ValueInt,paramDailyLength2.ValueInt, paramWeeklyLength1.ValueInt,paramWeeklyLength2.ValueInt); var WM = WeeklyPPO.Series(Close,paramWeeklyLength1.ValueInt,paramWeeklyLength2.ValueInt); HideVolume(); LineStyle solid = LineStyle.Solid; ChartPane paneWDPPO = CreatePane( 40,true,true ); PlotSeries( paneWDPPO,RDM,Color.FromArgb(255,0,100,0),LineStyle.Solid,2 ); PlotSeries( paneWDPPO,WM,Color.FromArgb(255,0,0,0),LineStyle.Solid,2 ); DrawHorzLine( paneWDPPO,0,Color.Blue,LineStyle.Solid,1 ); } } }