// private DataLoader_Variety dataLoader_Variety; public DeleteZZKLine_20160429() { //this.dataLoader_Variety = new DataLoader_Variety(DeleteZZKLine_20160429.PLUGINPATH); //List<VarietyInfo> varieties = this.dataLoader_Variety.GetVarieties(CodeInfoUtils.EXCHANGE_ZZ); //HashSet<string> set_ZZCode = new HashSet<string>(); //for (int i = 0; i < varieties.Count; i++) //{ // set_ZZCode.Add(varieties[i].Code); //} List <CodeInfo> codes = CsvUtils_Code.Load(DATAPATH_DATACENTER + "\\instruments"); CacheUtils_CodeInfo cache = new CacheUtils_CodeInfo(codes); List <CodeInfo> zzcodes = cache.GetCodesByExchange(CodeInfoUtils.EXCHANGE_ZZ); for (int i = 0; i < zzcodes.Count; i++) { CodeInfo code = zzcodes[i]; Step_DeleteKLine_CnFutures step = new Step_DeleteKLine_CnFutures(code.Code, DATAPATH_CNFUTURES); steps.Add(step); } for (int i = 0; i < zzcodes.Count; i++) { CodeInfo code = zzcodes[i]; Step_DeleteKLine_DataCenter step = new Step_DeleteKLine_DataCenter(code.Code, DATAPATH_DATACENTER); steps.Add(step); } }
public UpdatedDataLoader(string pluginPath, string csvDataPath) { PluginHelper helper = new PluginHelper(pluginPath); this.plugin_HistoryData = new Plugin_HistoryData_CnFutures(helper, csvDataPath); this.tradingDayCache = new CacheUtils_TradingDay(plugin_HistoryData.GetTradingDays()); this.codeInfoCache = new CacheUtils_CodeInfo(plugin_HistoryData.GetInstruments()); this.mainContracts = plugin_HistoryData.GetMainContractInfos(); }
public CodeInfo GetCodeInfo(String code) { CodeInfo codeInfo = updatedDataLoader.GetCodeCache().GetCode(code); if (codeInfo != null) { return(codeInfo); } if (newCodeInfoCache == null) { newCodeInfoCache = new CacheUtils_CodeInfo(dataProvider.GetNewCodes()); } return(newCodeInfoCache.GetCode(code)); }
public MainFuturesScan(string csvPath, List <CodeInfo> codes) { this.cache = new CacheUtils_CodeInfo(codes); this.csvPath = csvPath; }