Пример #1
0
        private static void ScalperIsConnected()
        {
            DefaultLogger.Instance.Log("Requesting history bars.");
            ITransaction getBars = new GetBarsCommand(barSettings.Symbol, barSettings.Interval, barSettings.Period);

            getBars.Execute();
        }
Пример #2
0
        public void IsConnected()
        {
            //DefaultLogger.Instance.Log("IsConnected.");
            //Console.WriteLine("IsConnected.");
            ITransaction getBars = new GetBarsCommand(barSettings.Symbol, barSettings.Interval, 3);

            getBars.Execute();
        }
Пример #3
0
        private static void ScalperIsConnected()
        {
            DefaultLogger.Instance.Log("Requesting history bars.");
            Console.WriteLine(String.Format("Requesting history bars Symbol: {0} Interval: {1} Period: {2}", barSettings.Symbol, barSettings.Interval, barSettings.Period));
            ITransaction getBars = new GetBarsCommand(barSettings.Symbol, barSettings.Interval, barSettings.Period);

            getBars.Execute();
        }
Пример #4
0
        public void GetBarsCommand_Test()
        {
            Assert.AreEqual(0, this.stServer.BarsReceived);

            int barIntervalSeconds = AppSettings.GetValue <int>("BarIntervalSeconds");
            int barQuantity        = AppSettings.GetValue <int>("BarQuantity");

            ITransaction transaction = new GetBarsCommand("RTS-12.13_FT", 60, 19, this.serverSingleton, new NullLogger());

            transaction.Execute();

            Assert.AreEqual(barQuantity, this.stServer.BarsReceived);
        }