Пример #1
0
        public void TestAutoTradeFiveMinDropHigher()
        {
            tradeListInFiveMin[0].price  = 5.1;
            tradeListInFiveMin[99].price = 4.9;
            AutoTradeFiveMinDropHigher at = (AutoTradeFiveMinDropHigher)AutoTradeRuleFactory.CreateAutoTradeRule(3);

            Assert.IsTrue(at.ShouldExecute(depth, tradeListInOneMin, tradeListInFiveMin, ticker, 1.9));
        }
Пример #2
0
        public void TestAutoTradeFiveMinAmountPerTradeHigher()
        {
            AutoTradeFiveMinAmountPerTradeHigher at = (AutoTradeFiveMinAmountPerTradeHigher)AutoTradeRuleFactory.CreateAutoTradeRule(5);

            Assert.IsTrue(at.ShouldExecute(depth, tradeListInOneMin, tradeListInFiveMin, ticker, 99));
        }
Пример #3
0
        public void TestAutoTradePriceLower()
        {
            AutoTradePriceLower at = (AutoTradePriceLower)AutoTradeRuleFactory.CreateAutoTradeRule(1);

            Assert.IsTrue(at.ShouldExecute(depth, tradeListInOneMin, tradeListInFiveMin, ticker, 5.01));
        }
Пример #4
0
        public void TestAutoTradeSellAmountIn10Higher()
        {
            AutoTradeSellAmountIn10Higher at = (AutoTradeSellAmountIn10Higher)AutoTradeRuleFactory.CreateAutoTradeRule(10);

            Assert.IsTrue(at.ShouldExecute(depth, tradeListInOneMin, tradeListInFiveMin, ticker, 50));
        }