public void setUp() { Random r = new Random(); List <IBar> bars = new List <IBar>(); for (int i = 0; i < 1000; i++) { double open = r.NextDouble(); double close = r.NextDouble(); double max = Math.Max(close + r.NextDouble(), open + r.NextDouble()); double min = Math.Min(0, Math.Min(close - r.NextDouble(), open - r.NextDouble())); DateTime dateTime = DateTime.Now; IBar bar = new BaseBar(dateTime, (decimal)open, (decimal)close, (decimal)max, (decimal)min, i); bars.Add(bar); } this.series = new BaseTimeSeries("test", bars); this.openPriceIndicator = new OpenPriceIndicator(this.series); this.minPriceIndicator = new MinPriceIndicator(this.series); this.maxPriceIndicator = new MaxPriceIndicator(this.series); this.volumeIndicator = new VolumeIndicator(this.series); ClosePriceIndicator closePriceIndicator = new ClosePriceIndicator(this.series); this.emaIndicator = new EMAIndicator(closePriceIndicator, 20); }
public void SetUp() { _timeSeries = GenerateTimeSeries.WithArbitraryTicks(); _openPriceIndicator = new OpenPriceIndicator(_timeSeries); }
public void setUp() { timeSeries = new MockTimeSeries(); openPriceIndicator = new OpenPriceIndicator(timeSeries); }