Beispiel #1
0
 public static LotTickData[] FilterByUsePrepareData(RuleInfo[] ruleList,
     out Dictionary<int, string> filterInfos, string fileName )
 {
     //先加载初始数据,初始数据只有红球,然后对最高优先级进行处理,然后合并,再进行其他处理
     LotTickData[] firData = ReadData(fileName);
     //TODO:最高优先级处理,并杀号,再组合,并进行其他过滤
     RuleInfo[] First = ruleList.Where(n => tb_IndexInfo.Find(tb_IndexInfo._.IndexName,
         n.IndexSelector.ToString().Replace("LotTick.Index_", "")).PriorLevel == 6).ToArray();
     LotTickData[] secData = FilterByRules(firData, First, out filterInfos);//过滤
     //排序,按照优先级大小进行
     RuleInfo[] LastOrder = ruleList.OrderByDescending(n=>tb_IndexInfo.Find(tb_IndexInfo._.IndexName,
         n.IndexSelector.ToString().Replace("LotTick.Index_", "")).PriorLevel).ToArray();            
     return FilterByRules(firData, LastOrder, out filterInfos);
 }
Beispiel #2
0
 public static LotTickData[] FilterByNotUsePrepareData(RuleInfo[] ruleList, out Dictionary<int, string> filterInfos)
 {
     //先获取优先级列表,从指标数据表中获取
     RuleInfo[] First = ruleList.Where(n => tb_IndexInfo.Find(tb_IndexInfo._.IndexName,
         n.IndexSelector.ToString().Replace("LotTick.Index_", "")).PriorLevel == 6).ToArray();
     RuleInfo[] Last = ruleList.Where(n => tb_IndexInfo.Find(tb_IndexInfo._.IndexName,
         n.IndexSelector.ToString().Replace("LotTick.Index_", "")).PriorLevel < 6).ToArray();           
     //先按照优先级进行划分,对最高级进行处理后,分为杀红号和杀蓝号
     LotTickData[] InitData = GetInitiaDataByNotUserPrepareData(First);
     //组合为LotTickData[],再进行其他的过滤,并输出过滤信息,过滤前后的数目
     return FilterByRules(InitData, Last, out filterInfos);
 }