Esempio n. 1
0
        public void ResetsProperly()
        {
            var atr = new AverageTrueRange(14, MovingAverageType.Simple);

            atr.Update(DateTime.Today, new TradeBarValue {
                Open   = 1d,
                High   = 3d,
                Low    = .5d,
                Close  = 2.75d,
                Volume = 1234567890
            });

            atr.Reset();

            TestHelper.AssertIndicatorIsInDefaultState(atr);
            TestHelper.AssertIndicatorIsInDefaultState(atr.TrueRange);
        }
        public override void ResetsProperly()
        {
            var atr = new AverageTrueRange(14, MovingAverageType.Simple);

            atr.Update(new TradeBar
            {
                Time   = DateTime.Today,
                Open   = 1m,
                High   = 3m,
                Low    = .5m,
                Close  = 2.75m,
                Volume = 1234567890
            });

            atr.Reset();

            TestHelper.AssertIndicatorIsInDefaultState(atr);
            TestHelper.AssertIndicatorIsInDefaultState(atr.TrueRange);
        }