首页 新闻 会员 周边 捐助

200分求 VS2010 Chart 股票图问题

0
悬赏园豆:200 [已关闭问题]

本人正在用2010的Chart控件在开发一个股票走势图由于刚开始了解,加上这方面的文章又很少,现在走势力以基本做好.但现在要做移动平均线,也就是5天平均线10天平均线这些.我有每天的收市价,但不知道在Chart里怎样做移动平均线.那们高手会的请多多指教.附上图片.

问题补充: 附上代码: string Strsql = "select * from (select top 60 PRO_CODE,CONVERT(varchar(100),date, 111) as Date,[OPEN],HIGH,LOW,[CLOSE] from HLOC order by date desc) as Data order by Date asc"; SQLServerHelp cs = new SQLServerHelp(); DataSet ds = cs.sqlSelectDS(Strsql); Chart1.DataSource = ds; Chart1.Series["Series1"].XValueMember = "Date"; Chart1.Series["Series1"].YValueMembers = "HIGH,LOW,OPEN,CLOSE"; Chart1.Series["Series1"].ToolTip = "Date\t= #VALX\nHight\t= #VALY\nLow\t= #VALY2\nOpen\t= #VALY3\nClose\t= #VALY4"; Chart1.DataBind(); string strsql = "select min(LOW) as LOW,max(HIGH) as HIGH from(select top 60 CONVERT(varchar(100),date, 111) as Date,[OPEN],HIGH,LOW,[CLOSE] from HLOC order by date desc) AS Data"; SQLServerHelp CS = new SQLServerHelp(); DataSet DS = CS.sqlSelectDS(strsql); string Mini = DS.Tables[0].Rows[0]["LOW"].ToString(); double Minimum = Convert.ToDouble(Mini); string High = DS.Tables[0].Rows[0]["HIGH"].ToString(); double HIGH = Convert.ToDouble(High); string PName = ds.Tables[0].Rows[0]["PRO_CODE"].ToString(); Chart1.ChartAreas["ChartArea1"].AxisX.Maximum = 61; Chart1.ChartAreas["ChartArea1"].AxisY.Minimum = Minimum - 30; Chart1.ChartAreas["ChartArea1"].AxisY.Maximum = HIGH + 30; Chart1.Titles["Title1"].Text = PName;
response2009的主页 response2009 | 初学一级 | 园豆:0
提问于:2010-06-25 16:06
< >
分享
其他回答(2)
0

kkk

翱鹰 | 园豆:205 (菜鸟二级) | 2010-06-25 16:40
0

图片不能显示,请上传一下图片。

dudu | 园豆:29568 (高人七级) | 2010-06-25 22:54
0

没有图片,移动平均线是什么?

Tear Y | 园豆:784 (小虾三级) | 2010-07-01 16:29
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册