public void TestItemAdded()
        {
            Ticker ticker = new Binance.BinanceTicker(Binance.BinanceExchange.Default);

            ticker.CandleStickData = GetCandleSticks(100);

            MacdIndicator macd = new MacdIndicator()
            {
                Ticker = ticker, Source = IndicatorSource.Close, Length = 9
            };
            StochasticIndicator stoch = new StochasticIndicator()
            {
                Ticker = ticker, Source = IndicatorSource.Close, Length = 9
            };

            macd.Calculate();
            stoch.Calculate();

            for (int i = 0; i < 10; i++)
            {
                CandleStickData date = GetCandleStick(DateTime.Now.AddMinutes(1));
                macd.OnAddValue();
                stoch.OnAddValue();
            }

            Assert.AreEqual(110, macd.Result.Count);
            Assert.AreEqual(110, macd.FastEmaIndicator.Result.Count);
            Assert.AreEqual(110, macd.SlowEmaIndicator.Result.Count);
            Assert.AreEqual(110, macd.SignalMaIndicator.Result.Count);

            Assert.AreEqual(110, stoch.MinIndicator.Result.Count);
            Assert.AreEqual(110, stoch.MaxIndicator.Result.Count);
            Assert.AreEqual(110, stoch.Result.Count);
        }
        public void TestCalculate()
        {
            Ticker ticker = new Binance.BinanceTicker(Binance.BinanceExchange.Default);

            ticker.CandleStickData = GetCandleSticks(100);

            MacdIndicator macd = new MacdIndicator()
            {
                Ticker = ticker, Source = IndicatorSource.Close, Length = 9
            };
            StochasticIndicator stoch = new StochasticIndicator()
            {
                Ticker = ticker, Source = IndicatorSource.Close, Length = 9
            };

            macd.Calculate();
            stoch.Calculate();

            Assert.AreEqual(100, macd.Result.Count);
            Assert.AreEqual(100, macd.FastEmaIndicator.Result.Count);
            Assert.AreEqual(100, macd.SlowEmaIndicator.Result.Count);
            Assert.AreEqual(100, macd.SignalMaIndicator.Result.Count);

            Assert.AreEqual(100, stoch.MinIndicator.Result.Count);
            Assert.AreEqual(100, stoch.MaxIndicator.Result.Count);
            Assert.AreEqual(100, stoch.MaIndicator.Result.Count);
            Assert.AreEqual(100, stoch.Result.Count);

            macd.Calculate();
            stoch.Calculate();

            Assert.AreEqual(100, macd.Result.Count);
            Assert.AreEqual(100, macd.FastEmaIndicator.Result.Count);
            Assert.AreEqual(100, macd.SlowEmaIndicator.Result.Count);
            Assert.AreEqual(100, macd.SignalMaIndicator.Result.Count);

            Assert.AreEqual(100, stoch.MinIndicator.Result.Count);
            Assert.AreEqual(100, stoch.MaxIndicator.Result.Count);
            Assert.AreEqual(100, stoch.Result.Count);
        }