Example #1
0
        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));
        }
Example #2
0
        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);
 }
Example #4
0
 public ClosePriceChangeTrend(IList <decimal> closes) : base(closes)
 {
     _closePriceChange = new ClosePriceChange(closes);
 }