public AveragePrice(Bars bars, string description) public static AveragePrice Series(Bars bars)
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() { DataSeries avg = AveragePrice.Series(Bars); Bars xBars = GetExternalSymbol("MSFT", true); DataSeries xAvg = AveragePrice.Series(xBars); DataSeries spreadPct = 100 * (xAvg/avg - 1); spreadPct.Description = "% Spread"; ChartPane cp = CreatePane(40, true, true); PlotSeries(cp, spreadPct, Color.Blue, LineStyle.Histogram, 2); } } }