Ejemplo n.º 1
0
        public static MTable GetMutliSetData(MongoDataReader 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_ForMG(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_ForMG cgp = new MutliValueGuidProcess_ForMG(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);
        }
Ejemplo n.º 2
0
        protected BaseDataTable SelectTable;//证券清单

        public RunResultClass Execute()
        {
            RunResultClass ret = new RunResultClass();
            RunNoticeClass msg = InParamsCheck(InParam);

            if (!msg.Success)
            {
                ret.Notice = msg;
                return(ret);
            }
            msg = new RunNoticeClass();
            msg = BaseFilter();
            if (!msg.Success)
            {
                ret.Notice = msg;
                return(ret);
            }
            msg = BaseFilter();
            if (!msg.Success)
            {
                ret.Notice = msg;
                return(ret);
            }
            return(ExecSelect());
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 基础过滤
        /// </summary>
        public RunNoticeClass BaseFilter()
        {
            RunNoticeClass ret = new RunNoticeClass();

            //BaseDataTable sectab = CommWDToolClass.GetMarketsStocks(w, InParam.SecIndex, InParam.EndT, InParam.OnMarketDays, InParam.CalcLastData, InParam.IsExcludeST, InParam.IsMAFilter, InParam.ExcludeSecList);
            //this.SelectTable = sectab;
            this.SelectTable.AddColumnByArray <bool>("Enable", false);
            return(ret);
        }
Ejemplo n.º 4
0
        public static BaseDataTable GetBaseData(MongoDataReader 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_ForMG(w, cyc, prcAdj);
            RunResultClass  bret = bp.getSetDataResult(codes, endt, args);

            if (!bret.Notice.Success)
            {
                return(new BaseDataTable());
            }
            return(new BaseDataTable(bret.Result));
        }
Ejemplo n.º 5
0
        public RunNoticeClass InParamsCheck(CommStrategyInClass Input)
        {
            RunNoticeClass ret = new RunNoticeClass();

            if (InParam == null)
            {
                ret.Msg = "输入参数对象不能为空!";
                return(ret);
            }
            if ((InParam.SecsPool == null || InParam.SecsPool.Count == 0) && (InParam.SecIndex == null || InParam.SecIndex.Trim().Length == 0))
            {
                ret.Msg = "备选池和指数不能同时为空!";
                return(ret);
            }
            return(ret);
        }