Beispiel #1
0
        public List <IStep> GetAllSteps()
        {
            List <IStep> steps = new List <IStep>();

            IUpdateInfoStore updateInfoStore = dataStore.CreateUpdateInfoStore();
            UpdatedDataInfo  updateDataInfo  = updateInfoStore.Load();

            Step_UpdateTradingDays step_UpdateTradingDays = new Step_UpdateTradingDays(historyData, dataStore);
            IList <int>            newTradingDays         = step_UpdateTradingDays.NewTradingDays;

            steps.Add(step_UpdateTradingDays);
            steps.Add(new Step_UpdateCode(historyData, dataStore));

            //确定是否保存每个品种的交易时间
            if (dataCenterConfig.StoredDataTypes.IsStoreTradingSession)
            {
                AddSteps_TradingSessions(steps);
            }
            //steps.AddRange(new StepGetter_UpdateKLineData_Vaieties(historyData, dataStore, dataCenterConfig.StoredDataTypes.StoreKLinePeriods).GetSteps());
            //确定是否保存tick数据
            // if (dataCenterConfig.StoredDataTypes.IsStoreTick)
            steps.AddRange(new StepGetter_UpdateTickData(historyData, dataStore, isFillUp, updateDataInfo, updateInfoStore, newTradingDays).GetSteps());
            //增加k线数据保存步骤
            steps.AddRange(new StepGetter_UpdateKLineData(historyData, dataStore, dataCenterConfig.StoredDataTypes.StoreKLinePeriods, isFillUp, updateDataInfo, updateInfoStore, newTradingDays).GetSteps());
            steps.Add(new Step_UpdateMainFutures(historyData, dataStore));
            return(steps);
        }
Beispiel #2
0
 public StepGetter_UpdateTickData(IPlugin_HistoryData historyData, IDataStore dataStore, bool isFillUp, UpdatedDataInfo updatedDataInfo, IUpdateInfoStore updateInfoStore, IList <int> newTradingDays)
 {
     this.historyData     = historyData;
     this.dataStore       = dataStore;
     this.isFillUp        = isFillUp;
     this.updatedDataInfo = updatedDataInfo;
     this.updateInfoStore = updateInfoStore;
     this.newTradingDays  = newTradingDays;
 }
Beispiel #3
0
 public StepGetter_UpdateKLineData(IPlugin_HistoryData historyData, IDataStore dataStore, List <KLinePeriod> updatePeriods, bool isFillUp, UpdatedDataInfo updatedDataInfo, IUpdateInfoStore updateInfoStore, IList <int> newTradingDays)
 {
     this.historyData     = historyData;
     this.klineDataStore  = dataStore.CreateKLineDataStore();
     this.updatePeriods   = updatePeriods;
     this.isFillUp        = isFillUp;
     this.updatedDataInfo = updatedDataInfo;
     this.updateInfoStore = updateInfoStore;
     this.newTradingDays  = newTradingDays;
 }
Beispiel #4
0
        //public Step_UpdateKLineData(string code, int startDate, int endDate, KLinePeriod period, IPlugin_HistoryData historyData, IKLineDataStore klineDataStore)
        //{
        //    this.code = code;

        //    this.period = period;
        //    this.historyData = historyData;
        //    this.klineDataStore = klineDataStore;
        //}

        public Step_UpdateKLineData(CodeInfo codeInfo, KLinePeriod period, ITradingDayReader tradingDayReader, IPlugin_HistoryData historyData, IKLineDataStore klineDataStore, UpdatedDataInfo updatedDataInfo, IUpdateInfoStore updateInfoStore, bool updateFillUp)
        {
            this.codeInfo         = codeInfo;
            this.tradingDayReader = tradingDayReader;
            this.period           = period;
            this.historyData      = historyData;
            this.klineDataStore   = klineDataStore;
            this.updatedDataInfo  = updatedDataInfo;
            this.updateInfoStore  = updateInfoStore;
            this.updateFillUp     = updateFillUp;
        }
Beispiel #5
0
 public Step_UpdateTickData(string code, List <int> tradingDays, IPlugin_HistoryData historyData, ITickDataStore tickDataStore, UpdatedDataInfo updatedDataInfo, IUpdateInfoStore updateInfoStore) : this(code, tradingDays, historyData, tickDataStore)
 {
     this.updatedDataInfo = updatedDataInfo;
     this.updateInfoStore = updateInfoStore;
 }