public static MTable GetMutliSetData(WindAPI w, string[] code, DateTime endt, Cycle cyc, PriceAdj prcAdj, bool IncludeBaseData, string args) { RunNoticeClass ret = new RunNoticeClass(); MTable mtab = new MTable(); if (IncludeBaseData) { BaseDataProcess bp = new BaseDataProcess_ForWD(w, cyc, prcAdj); RunResultClass bret = bp.getSetDataResult(code, endt, new object[0] { }); if (!bret.Notice.Success) { mtab.Union(bret.Result); //return new BaseDataTable(); } } Dictionary <string, HashSet <string> > guids = getMutliValueGuid(args.Split(',')); foreach (string key in guids.Keys) { MutliValueGuidProcess_ForWD cgp = new MutliValueGuidProcess_ForWD(w, key, guids[key].ToArray <string>()); cgp.cycle = cyc; cgp.prcAdj = prcAdj; RunResultClass cret = cgp.getSetDataResult(code, endt, new object[0] { }); mtab.Union(cret.Result); } return(mtab); }
public static MTable getBkList(WindAPI w, string sec, DateTime dt, bool FilterTheNoPrice) { SecIndexClass sic = new SecIndexClass(sec); secIndexBuilder sib = new secIndexBuilder(w, sic); MTable mt = sib.getBkList(dt); if (mt == null || mt.Count == 0) { return(mt); } BaseDataProcess_ForWD bdp = new BaseDataProcess_ForWD(w); string[] seccodes = mt["wind_code"].ToList <string>().ToArray(); RunResultClass rc = bdp.getSetDataResult(seccodes, "close", dt); MTable ret = new MTable(); List <DataRow> NewDrs = new List <DataRow>(); for (int i = 0; i < rc.Result.Count; i++) { DataRow retdr = mt.GetTable().Rows[i]; DataRow dr = rc.Result.GetTable().Rows[i]; if (dr.IsNull("CLOSE") && FilterTheNoPrice) { continue; } NewDrs.Add(retdr); } ret.FillList(NewDrs.ToArray()); return(ret); }
public static BaseDataTable GetBaseData(WindAPI w, string[] codes, DateTime endt, Cycle cyc, PriceAdj prcAdj, params object[] args) { RunNoticeClass ret = new RunNoticeClass(); //MACDGuidProcess mp = new MACDGuidProcess(gb.w); //RunResultClass ret = mp.getDateSerialResult("000100.SZ",Convert.ToDateTime("2017/7/7"), DateTime.Today); BaseDataProcess bp = new BaseDataProcess_ForWD(w, cyc, prcAdj); RunResultClass bret = bp.getSetDataResult(codes, endt, args); if (!bret.Notice.Success) { return(new BaseDataTable()); } return(new BaseDataTable(bret.Result)); }