private IKLineData ReadKLineData() { string klinepath = path + "\\kline\\1minute\\" + code + "_1MINUTE_" + date + ".csv"; if (!File.Exists(klinepath)) { return(null); } return(CsvUtils_KLineData.Load(klinepath)); }
/// <summary> /// 得到单日的K线数据 /// </summary> /// <param name="code"></param> /// <param name="date"></param> /// <param name="period"></param> /// <returns></returns> public virtual IKLineData GetKLineData(string code, int date, KLinePeriod period) { string path = CsvHistoryData_PathUtils.GetKLineDataPath(GetCsvDataPath(), code, date, period); if (!File.Exists(path)) { return(null); } return(CsvUtils_KLineData.Load(path)); }
private IKLineData DownloadKLine(string code) { string path = pathutils.GetKLinePath(code); if (File.Exists(path)) { IKLineData klineData = CsvUtils_KLineData.Load(path); int lastUpdatedDate = (int)klineData.Arr_Time[klineData.Length - 1]; AppendKLineData(code, path, lastUpdatedDate); } else { AppendKLineData(code, path, -1); } return(CsvUtils_KLineData.Load(path)); }
private KLineData GetKLineData_1Min() { string path = TestCaseManager.GetTestCasePath(GetType(), "KLineData_M01_1Minute"); return((KLineData)CsvUtils_KLineData.Load(path)); }