Ejemplo n.º 1
0
        public void TestGetKLineDataTimeInfo()
        {
            IDataReader       dataReader = DataCenter.Default.DataReader;
            KLineDataTimeInfo timeInfo   = dataReader.KLineDataReader.GetKLineDataTimeInfo("rb1801", 20170801, 20170810, KLinePeriod.KLinePeriod_1Minute);

            Console.WriteLine(timeInfo);
            //ITradingTimeReader_Code reader = dataReader.CreateTradingTimeReader("rb1801");
        }
Ejemplo n.º 2
0
        public void TestGetKLineDataTimeInfo_Days()
        {
            IList <double[]>[] openTimeArr = new List <double[]> [2];
            openTimeArr[0] = GetDay1();
            openTimeArr[1] = GetDay2();

            KLineDataTimeInfo timeInfo = TradingTimeUtils.GetKLineDataTimeInfo(openTimeArr, new KLinePeriod(KLineTimeType.MINUTE, 1));

            //List<double[]> klineTimeList = TradingTimeUtils.GetKLineTimeList_Full(openTime, KLinePeriod.KLinePeriod_15Minute);
            //List<double[]> klineTimeList = TradingTimeUtils.GetKLineTimeList_Full(openTime, KLinePeriod.KLinePeriod_1Hour);
            Console.WriteLine(timeInfo);
        }
Ejemplo n.º 3
0
        public void TestGetKLineDataTimeInfo()
        {
            List <double[]> openTime = new List <double[]>();

            openTime.Add(new double[] { 20150107.210000, 20150107.230000 });
            openTime.Add(new double[] { 20150110.090000, 20150110.101500 });
            openTime.Add(new double[] { 20150110.103000, 20150110.113000 });
            openTime.Add(new double[] { 20150110.133000, 20150110.150000 });

            KLineDataTimeInfo timeInfo = TradingTimeUtils.GetKLineDataTimeInfo(openTime, new KLinePeriod(KLineTimeType.MINUTE, 1));

            //List<double[]> klineTimeList = TradingTimeUtils.GetKLineTimeList_Full(openTime, KLinePeriod.KLinePeriod_15Minute);
            //List<double[]> klineTimeList = TradingTimeUtils.GetKLineTimeList_Full(openTime, KLinePeriod.KLinePeriod_1Hour);
            Console.WriteLine(timeInfo);
        }