private List <IStep> GetAllStep_Varieties() { List <IStep> steps = new List <IStep>(); Step_CodeInfo step_CodeInfo = new Step_CodeInfo(dataUpdateHelper); List <CodeInfo> allCodes = step_CodeInfo.GetAllCodes(); allCodes = FilterCodeInfo(allCodes, new string[] { "RB", "HC", "BU" }); GetTradingTime(steps, allCodes, true); UpdatedDataInfo updatedDataInfo = new UpdatedDataInfo(targetDataPath); ITradingDayReader tradingDayReader = dataUpdateHelper.GetAllTradingDayReader(); for (int i = 0; i < allCodes.Count; i++) { CodeInfo codeInfo = allCodes[i]; int startDate = codeInfo.Start; if (startDate == 0) { startDate = tradingDayReader.FirstTradingDay; } int endDate = codeInfo.End; if (endDate <= 0) { endDate = tradingDayReader.LastTradingDay; } List <int> tradingDays = new List <int>(); tradingDays.AddRange(tradingDayReader.GetTradingDays(startDate, endDate)); GetKLineDataSteps(steps, codeInfo, tradingDays, updatedDataInfo); } return(steps); }
public void Test_DataUpdateHelper() { DataUpdateHelper dataUpdateHelper = GetDataUpdateHelper_JinShuYuan(); List <int> tradingDays = dataUpdateHelper.GetAllTradingDayReader().GetAllTradingDays(); AssertUtils.PrintLineList(tradingDays); List <CodeInfo> codes = dataUpdateHelper.GetNewCodes(); AssertUtils.PrintLineList(codes); }