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)); }
public void TestAutoTradeFiveMinAmountPerTradeHigher() { AutoTradeFiveMinAmountPerTradeHigher at = (AutoTradeFiveMinAmountPerTradeHigher)AutoTradeRuleFactory.CreateAutoTradeRule(5); Assert.IsTrue(at.ShouldExecute(depth, tradeListInOneMin, tradeListInFiveMin, ticker, 99)); }
public void TestAutoTradePriceLower() { AutoTradePriceLower at = (AutoTradePriceLower)AutoTradeRuleFactory.CreateAutoTradeRule(1); Assert.IsTrue(at.ShouldExecute(depth, tradeListInOneMin, tradeListInFiveMin, ticker, 5.01)); }
public void TestAutoTradeSellAmountIn10Higher() { AutoTradeSellAmountIn10Higher at = (AutoTradeSellAmountIn10Higher)AutoTradeRuleFactory.CreateAutoTradeRule(10); Assert.IsTrue(at.ShouldExecute(depth, tradeListInOneMin, tradeListInFiveMin, ticker, 50)); }