Example #1
0
        //[TestMethod]
        public void TestKLineData_Play()
        {
            string code    = "RB1710";
            int    start   = 20170601;
            int    endDate = 20170601;

            IDataForward_Code klineDataForward = GetKLineDataForward(code, start, endDate);

            klineDataForward.OnTick += KlineDataForward_OnTick;
            Console.WriteLine(klineDataForward.GetKLineData(KLinePeriod.KLinePeriod_1Minute));
            klineDataForward.Play();
            while (klineDataForward.Time < 20170531.210005)
            {
            }
            klineDataForward.Pause();
        }
Example #2
0
        //[TestMethod]
        public void TestHistoryDataForward_Play()
        {
            string code    = "RB1710";
            int    start   = 20170601;
            int    endDate = 20170601;

            IDataForward_Code realTimeReader = ForwardDataGetter.GetHistoryDataForward_Code(code, start, endDate, true);

            realTimeReader.OnTick += RealTimeReader_OnTick;
            realTimeReader.NavigateTo(20170531.210011);
            realTimeReader.Play();
            while (realTimeReader.Time < 20170531.210015)
            {
            }
            realTimeReader.Pause();
        }