Beispiel #1
0
        public List <IStep> GetSteps_TradingDay()
        {
            List <IStep>    steps          = new List <IStep>();
            List <CodeInfo> allInstruments = historyData.GetInstruments();

            AddSteps_TickData_TradingDay(steps, allInstruments, 20180102);
            //AddSteps_TickData_TradingDay(steps, allInstruments, 20170719);
            //AddSteps_TickData_TradingDay(steps, allInstruments, 20170720);
            //AddSteps_TickData_TradingDay(steps, allInstruments, 20170721);
            return(steps);
        }
Beispiel #2
0
        private void AddSteps_TradingSessions(List <IStep> steps)
        {
            List <CodeInfo> instruments = historyData.GetInstruments();

            for (int i = 0; i < instruments.Count; i++)
            {
                Step_UpdateTradingTime_Code step = new Step_UpdateTradingTime_Code(instruments[i].Code, historyData, dataStore);
                steps.Add(step);
            }
        }
Beispiel #3
0
        private List <IStep> AddStep_Varieties()
        {
            List <IStep>    steps       = new List <IStep>();
            List <CodeInfo> allCodes    = historyData.GetInstruments();
            List <CodeInfo> updateCodes = FilterCodeInfo(allCodes, new string[] { "RB", "HC", "BU" });

            for (int i = 0; i < updateCodes.Count; i++)
            {
                CodeInfo codeInfo = updateCodes[i];
                AddStep(codeInfo, steps);
            }
            return(steps);
        }
Beispiel #4
0
        private void AddSteps_KLineData(List <IStep> steps)
        {
            List <CodeInfo> instruments = historyData.GetInstruments();
            List <int>      tradingDays = historyData.GetTradingDays();

            CacheUtils_TradingDay cache = new CacheUtils_TradingDay(tradingDays);

            for (int i = 0; i < instruments.Count; i++)
            {
                CodeInfo codeInfo = instruments[i];
                if (codeInfo.End == 0 || codeInfo.End >= 20170718)
                {
                    AddSteps_KLineData_Instrument(steps, codeInfo, cache);
                }
            }
        }
Beispiel #5
0
 public Step_UpdateCode(IPlugin_HistoryData historyData, IDataStore dataStore)
 {
     this.codes           = historyData.GetInstruments();
     this.instrumentStore = dataStore.CreateInstrumentStore();
 }