public TradeModel GetGuessInfo(List <string> listUnitwork) { TradeModel model = new TradeModel(); model.avg = GetAvgNum(listUnitwork).ToString(); //平均值 model.later = GetMonthLater(listUnitwork).ToString(); //月末值 model.max = GetMax(listUnitwork).ToString(); //最大值 model.min = GetMin(listUnitwork).ToString(); //最小值 model.maxavg = GetAvgMax(listUnitwork, model.avg).ToString(); //平均最大值 model.minavg = GetAvgMin(listUnitwork, model.avg).ToString(); //平均最小值 model.diefu = GetLow(model.avg, model.minavg).ToString(); //跌幅值 model.zhangfu = GetHigh(model.avg, model.maxavg).ToString(); //涨幅值 model.bowave = GetWave(model.diefu, model.zhangfu).ToString(); //波动值 model.safelow = GetSafeLow(model.minavg, model.bowave).ToString(); //安全期最低值 model.safehigh = GetSafeHigh(model.maxavg, model.bowave).ToString(); //安全期最高值 model.safetradecent = GetSafeTradeCent(model.avg, model.bowave).ToString(); //安全期买卖价 model.paywaverate = GetPayWaveRate(model.bowave, model.safetradecent).ToString(); //盈利波动 model.maxpaycent = GetMaxPayCent(model.safetradecent, model.paywaverate).ToString(); //最大盈利值 model.maxlosecent = GetMaxLoseCent(model.safetradecent, model.paywaverate).ToString(); //最大亏损净值 model.greatbuy = GetGreatBuy(model.avg, model.later, model.min).ToString(); //最低买入值 model.greatsale = GetGreatSale(model.avg, model.later, model.max).ToString(); //最高卖出值 Datas = GetFundDetailList(model); return(model); }
public List <FundDetail> GetFundDetailList(TradeModel ctrademodel) { List <FundDetail> cfunddetaillst = new List <FundDetail>(); FundDetail cfunddetail = new FundDetail(); int num = 1; cfunddetail.num = num++; cfunddetail.item = "平均值"; cfunddetail.value = ctrademodel.avg.ToString(); cfunddetaillst.Add(cfunddetail); cfunddetail.num = num++; cfunddetail.item = "月末值"; cfunddetail.value = ctrademodel.later.ToString(); cfunddetaillst.Add(cfunddetail); cfunddetail.num = num++; cfunddetail.item = "最大值"; cfunddetail.value = ctrademodel.max.ToString(); cfunddetaillst.Add(cfunddetail); cfunddetail.num = num++; cfunddetail.item = "最小值"; cfunddetail.value = ctrademodel.min.ToString(); cfunddetaillst.Add(cfunddetail); cfunddetail.num = num++; cfunddetail.item = "平均最大值"; cfunddetail.value = ctrademodel.maxavg.ToString(); cfunddetaillst.Add(cfunddetail); cfunddetail.num = num++; cfunddetail.item = "平均最小值"; cfunddetail.value = ctrademodel.minavg.ToString(); cfunddetaillst.Add(cfunddetail); cfunddetail.num = num++; cfunddetail.item = "跌幅值"; cfunddetail.value = ctrademodel.diefu.ToString(); cfunddetaillst.Add(cfunddetail); cfunddetail.num = num++; cfunddetail.item = "波动值"; cfunddetail.value = ctrademodel.bowave.ToString(); cfunddetaillst.Add(cfunddetail); cfunddetail.num = num++; cfunddetail.item = "安全期最低值"; cfunddetail.value = ctrademodel.safelow.ToString(); cfunddetaillst.Add(cfunddetail); cfunddetail.num = num++; cfunddetail.item = "安全期最高值"; cfunddetail.value = ctrademodel.safehigh.ToString(); cfunddetaillst.Add(cfunddetail); cfunddetail.num = num++; cfunddetail.item = "安全期买卖价"; cfunddetail.value = ctrademodel.safetradecent.ToString(); cfunddetaillst.Add(cfunddetail); cfunddetail.num = num++; cfunddetail.item = "盈利波动"; cfunddetail.value = ctrademodel.paywaverate.ToString(); cfunddetaillst.Add(cfunddetail); cfunddetail.num = num++; cfunddetail.item = "最大盈利值"; cfunddetail.value = ctrademodel.maxpaycent.ToString(); cfunddetaillst.Add(cfunddetail); cfunddetail.num = num++; cfunddetail.item = "最大亏损净值"; cfunddetail.value = ctrademodel.maxlosecent.ToString(); cfunddetaillst.Add(cfunddetail); cfunddetail.num = num++; cfunddetail.item = "最低买入值"; cfunddetail.value = ctrademodel.greatbuy.ToString(); cfunddetaillst.Add(cfunddetail); cfunddetail.num = num++; cfunddetail.item = "最高卖出值"; cfunddetail.value = ctrademodel.greatsale.ToString(); cfunddetaillst.Add(cfunddetail); return(cfunddetaillst); }