public void InitContext() { TradeSharpDictionary.Initialize(MoqTradeSharpDictionary.Mock); context = TestRobotUtil.GetRobotContextBacktest(new DateTime(2013, 9, 30), new DateTime(2014, 1, 30), currency: "IND"); bot = new IchimokuRobot(); bot.Graphics.Clear(); bot.Graphics.Add(new Cortege2 <string, BarSettings>("INDUSD", new BarSettings { StartMinute = 0, Intervals = new List <int> { 30 } })); bot.Initialize(context, CurrentProtectedContext.Instance); ExecutablePath.InitializeFake(string.Empty); }
public void TestSetup() { TradeSharpDictionary.Initialize(MoqTradeSharpDictionary.Mock); context = TestRobotUtil.GetRobotContextBacktest(new DateTime(2013, 12, 25), new DateTime(2013, 12, 25).AddDays(30)); bot = new VoidRobot(); bot.Graphics.Add(new Cortege2 <string, BarSettings>("EURUSD", new BarSettings { StartMinute = 0, Intervals = new List <int> { 30 } })); bot.Initialize(context, CurrentProtectedContext.Instance); ExecutablePath.InitializeFake(string.Empty); context.SubscribeRobot(bot); context.InitiateTest(); // Инициализация дополнительных объектом, MOCK-и QuoteMaker.FillQuoteStorageWithDefaultValues(); }
public void InitContext() { TradeSharpDictionary.Initialize(MoqTradeSharpDictionary.Mock); context = TestRobotUtil.GetRobotContextBacktest(new DateTime(2013, 12, 25), new DateTime(2013, 12, 25).AddDays(30)); bot = new RobotMA { RangeFastMA = 5, RangeSlowMA = 15, DeriveSiteFromHistory = true }; bot.Graphics.Add(new Cortege2 <string, BarSettings>("EURUSD", new BarSettings { StartMinute = 0, Intervals = new List <int> { 30 } })); bot.Initialize(context, CurrentProtectedContext.Instance); ExecutablePath.InitializeFake(string.Empty); context.SubscribeRobot(bot); context.InitiateTest(); }