public void ComparesAgainstExternalDataAfterReset()
        {
            var adOsc = new AccumulationDistributionOscillator("ADOSC", 3, 10);

            RunTestIndicator(adOsc);
            adOsc.Reset();
            RunTestIndicator(adOsc);
        }
        public void ResetsProperly()
        {
            var adOsc = new AccumulationDistributionOscillator("ADOSC", 3, 10);
            foreach (var data in TestHelper.GetTradeBarStream("spy_ad_osc.txt", false))
            {
                adOsc.Update(data);
            }

            Assert.IsTrue(adOsc.IsReady);

            adOsc.Reset();

            TestHelper.AssertIndicatorIsInDefaultState(adOsc);
        }
        public void ComparesAgainstExternalData()
        {
            var adOsc = new AccumulationDistributionOscillator("ADOSC", 3, 10);

            TestHelper.TestIndicator(adOsc, "spy_ad_osc.txt", "AdOsc_3_10", (ind, expected) => Assert.AreEqual(expected, (double)ind.Current.Value, 1e-3));
        }
 private static void RunTestIndicator(AccumulationDistributionOscillator adOsc)
 {
     TestHelper.TestIndicator(adOsc, "spy_ad_osc.txt", "AdOsc_3_10", (ind, expected) => Assert.AreEqual(expected, (double)ind.Current.Value, 1e-3));
 }
        public void ResetsProperly()
        {
            var adOsc = new AccumulationDistributionOscillator("ADOSC", 3, 10);

            TestHelper.TestIndicatorReset(adOsc, "spy_ad_osc.txt");
        }