Example #1
0
        private void DoUpdate(String code, DataReaderFactory tmpFac, IKLineData data, KLinePeriod period)
        {
            //TODO 检查已有文件的时间
            IKLineData     data_Target = DataTransfer_KLine2KLine.Transfer(data, period);
            String         path        = utils.GetKLineDataPath(code, period);
            KLineDataStore store       = new KLineDataStore(path);

            store.Append(data_Target);
        }
Example #2
0
        public IKLineData UpdateByKLine(String code, DataReaderFactory dataReaderFactory, KLinePeriod period, IKLineData originalData)
        {
            IKLineData     data_Target = DataTransfer_KLine2KLine.Transfer(originalData, period);
            String         path        = utils.GetKLineDataPath(code, period);
            KLineDataStore store       = new KLineDataStore(path);

            store.Append(data_Target);
            return(data_Target);
        }
Example #3
0
        private void UpdateBy1Minute(String code, DataReaderFactory dataReaderFactory, KLinePeriod period)
        {
            int            lastDate    = dataReaderFactory.KLineDataReader.GetLastDate(code, period);
            IKLineData     data        = dataReaderFactory.KLineDataReader.GetData(code, lastDate + 1, int.MaxValue, period);
            IKLineData     data_Target = DataTransfer_KLine2KLine.Transfer(data, period);
            String         path        = utils.GetKLineDataPath(code, period);
            KLineDataStore store       = new KLineDataStore(path);

            store.Append(data_Target);
        }