public static StockOpeItem[] GetAnalysis2List(int type, int startdate, int enddate, string[] buyrules, string[] sellrules, double goodsccore, bool applyDefaultSell, bool restrict_end_to_sell) { List <StockOpeItem> list = new List <StockOpeItem>(); for (int i = 0; i < buyrules.Length; i++) { StockOpeItem[] items = GetAnalysis2List(type, startdate, enddate, buyrules[i], sellrules[i], goodsccore, applyDefaultSell, restrict_end_to_sell); for (int j = 0; j < items.Length; j++) { list.Add(items[j]); } } newsCompare comp = new newsCompare(); list.Sort(comp); return(list.ToArray()); }
//按照日期排序 public void AddOpeItem(StockOpeItem item) { string date = item.buydate.ToString(); object obj = hsallitems[date]; if (obj == null) { obj = new List <StockOpeItem>(); } List <StockOpeItem> list = (List <StockOpeItem>)obj; list.Add(item); //grade高的在前面 newsCompare comp = new newsCompare(); list.Sort(comp); hsallitems[date] = list; }