Пример #1
0
        public void ComparesAgainstExternalDataAfterReset()
        {
            var bop = new BalanceOfPower("BOP");

            RunTestIndicator(bop);
            bop.Reset();
            RunTestIndicator(bop);
        }
Пример #2
0
        public void ResetsProperly()
        {
            var bop = new BalanceOfPower("BOP");
            foreach (var data in TestHelper.GetTradeBarStream("spy_bop.txt", false))
            {
                bop.Update(data);
            }

            Assert.IsTrue(bop.IsReady);

            bop.Reset();

            TestHelper.AssertIndicatorIsInDefaultState(bop);
        }
Пример #3
0
        public void ComparesAgainstExternalData()
        {
            var bop = new BalanceOfPower("BOP");

            TestHelper.TestIndicator(bop, "spy_bop.txt", "BOP", (ind, expected) => Assert.AreEqual(expected, (double)bop.Current.Value, 1e-3));
        }
Пример #4
0
 private static void RunTestIndicator(BalanceOfPower bop)
 {
     TestHelper.TestIndicator(bop, "spy_bop.txt", "BOP", (ind, expected) => Assert.AreEqual(expected, (double)ind.Current.Value, 1e-3));
 }
Пример #5
0
        public void ResetsProperly()
        {
            var bop = new BalanceOfPower("BOP");

            TestHelper.TestIndicatorReset(bop, "spy_bop.txt");
        }