public async Task TestClosePriceChangedAsync() { var equity = await ImportEquityAsync(); var indicator = new ClosePriceChange(equity); var result = indicator.ComputeByIndex(equity.Count - 1); Assert.IsTrue(0.16m.IsApproximatelyEquals(result.Change.Value)); }
public async Task TestClosePriceChangedAsync() { var candles = await ImportCandlesAsync(); var indicator = new ClosePriceChange(candles); var result = indicator[candles.Count - 1]; Assert.IsTrue(0.16m.IsApproximatelyEquals(result.Value)); indicator = new ClosePriceChange(candles, 20); result = indicator[candles.Count - 1]; Assert.IsTrue(6.41m.IsApproximatelyEquals(result.Value)); }
public ClosePriceChangeTrend(Equity equity) : base(equity) { _closePriceChangeIndicator = new ClosePriceChange(equity); }
public ClosePriceChangeTrend(IList <decimal> closes) : base(closes) { _closePriceChange = new ClosePriceChange(closes); }