/// <summary> /// 使用指定的股票历史信息初始化 /// </summary> /// <param name="histories">指定的股票历史信息</param> public void Init(StocksHistory histories) { foreach (IStockHistory hist in histories.GetAllHistories()) { StockMappings_.Add(StringMapping_.GetCharMapping(hist)); } }
/// <summary> /// 查看指定的历史的匹配 /// </summary> /// <param name="hist">一段时间的股票走势</param> public void FindMatches(IStockHistory hist) { string s = StringMapping_.GetCharMapping(hist); if (string.IsNullOrEmpty(s)) { return; } var findResult = (from item in StockMappings_ where item.Contains(s) select item); foreach (var item in findResult) { AnalyzeNextDay(item, s); } PrintResult(); }