예제 #1
0
        //private void initIpoDates()
        //{
        //    List<CodeInfo> codes = this.codeInfoGenerator.GetAllOldCodes();
        //    for (int i = 0; i < codes.Count; i++)
        //    {
        //        string code = codes[i].Code;
        //        dic_OldCodeId_IpoDate.Add(code, GetIpoDateInternal(code));
        //    }
        //}

        //private int GetIpoDateInternal(string oldCodeId)
        //{
        //    ITradingDayReader reader = this.dataprovider_TradingDay.GetTradingDayReader();
        //    List<int> tradingDays = reader.GetAllTradingDays();
        //    for (int i = 0; i < tradingDays.Count; i++)
        //    {
        //        int date = tradingDays[i];
        //        string path = GetOldCodePath(oldCodeId, date);
        //        if (File.Exists(path))
        //            return date;
        //    }
        //    return -1;
        //}

        //private String GetOldCodePath(String code, int date)
        //{
        //    return srcDataPath + "\\" + codeInfoGenerator.DataLoader_CodeInfo.GetBelongMarket(code) + "\\" + date + "\\" + code + "_" + date + ".csv";
        //}

        //private int GetIpoDate(String oldCodeId)
        //{
        //    Init();
        //    if (dic_OldCodeId_IpoDate.ContainsKey(oldCodeId))
        //        return dic_OldCodeId_IpoDate[oldCodeId];
        //    return -1;
        //}

        #region 获得tickdata

        public ITickData LoadTickData(string code, int date)
        {
            TickDataAdjuster tickDataAdjuster = new TickDataAdjuster();
            TickData         tickData         = LoadOriginalTickData(code, date);

            if (tickData == null)
            {
                return(null);
            }
            tickDataAdjuster.Adjust(tickData, dataLoader_TradingSessionDetail.GetTradingTime(code, date));
            return(tickData);
        }
예제 #2
0
 public List <double[]> LoadTradingSessionDetail(string code, int date)
 {
     return(dataLoader_TradingSessionDetail.GetTradingTime(code, date));
 }