예제 #1
0
        public void MassIndexUsing3And8TimeFrames()
        {
            var massIndex = new MassIndexIndicator(_data, 3, 8);

            TaTestsUtils.AssertDecimalEquals(massIndex.GetValue(0), 1);
            TaTestsUtils.AssertDecimalEquals(massIndex.GetValue(14), 9.1158);
            TaTestsUtils.AssertDecimalEquals(massIndex.GetValue(15), 9.2462);
            TaTestsUtils.AssertDecimalEquals(massIndex.GetValue(16), 9.4026);
            TaTestsUtils.AssertDecimalEquals(massIndex.GetValue(17), 9.2129);
            TaTestsUtils.AssertDecimalEquals(massIndex.GetValue(18), 9.1576);
            TaTestsUtils.AssertDecimalEquals(massIndex.GetValue(19), 9.0184);
        }
예제 #2
0
        public void massIndexUsing3And8TimeFrames()
        {
            MassIndexIndicator massIndex = new MassIndexIndicator(data, 3, 8);

            Assert.AreEqual(massIndex.GetValue(0), 1M);
            Assert.AreEqual(massIndex.GetValue(14), 9.115829365463941053935910885M);
            Assert.AreEqual(massIndex.GetValue(15), 9.246164705004149799504218758M);
            Assert.AreEqual(massIndex.GetValue(16), 9.402602394695373641121440309M);
            Assert.AreEqual(massIndex.GetValue(17), 9.212873588690283960659225404M);
            Assert.AreEqual(massIndex.GetValue(18), 9.157597903430717027923668930M);
            Assert.AreEqual(massIndex.GetValue(19), 9.018409083490046411626762552M);
        }