예제 #1
0
        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);
        }
예제 #2
0
        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();
        }
예제 #3
0
        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();
        }