using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators; using TASCIndicators;namespace WealthLab.Strategies { public class MidasTouch : WealthScript { protected override void Execute() { const int c = 6; const double pct = 7d; Color">c"> color = new Color[c; color0 = Color.Blue; color1 = Color.Red; color2 = Color.BlueViolet; color3 = Color.Fuchsia; color4 = Color.Green; DataSeries ap = AveragePrice.Series(Bars); DataSeries pbSer = PeakBar.Series(ap, pct, PeakTroughMode.Percent); DataSeries tbSer = TroughBar.Series(ap, pct, PeakTroughMode.Percent); int bar = Bars.Count - 1; int n = 0; while (bar > 1 && n < c) { int pb = (int)pbSerbar; int tb = (int)tbSerbar; bar = Math.Max( pb, tb ); DataSeries midas = Midas.Series(Bars, bar); PlotSeries(PricePane, midas, colorn, LineStyle.Solid, 2); n += 1; bar -= 1; } } } }