Ejemplo n.º 1
0
        public async Task TestSlowStoAsync()
        {
            var candles = await ImportCandlesAsync();

            var indicator = new Stochastics.Slow(candles, 14, 3);
            var result    = indicator[candles.Count - 1];

            Assert.IsTrue(92.31m.IsApproximatelyEquals(result.K.Value));
            Assert.IsTrue(93.25m.IsApproximatelyEquals(result.D.Value));
            Assert.IsTrue(90.43m.IsApproximatelyEquals(result.J.Value));
        }
Ejemplo n.º 2
0
        public async Task TestSlowStoAsync()
        {
            var equity = await ImportEquityAsync();

            var indicator = new Stochastics.Slow(equity, 14, 3);
            var result    = indicator.ComputeByIndex(equity.Count - 1);

            Assert.IsTrue(92.31m.IsApproximatelyEquals(result.K.Value));
            Assert.IsTrue(93.25m.IsApproximatelyEquals(result.D.Value));
            Assert.IsTrue(90.43m.IsApproximatelyEquals(result.J.Value));
        }