- 博客(13)
- 收藏
- 关注
原创 C#画K线实现画K线和截图保存
string begindate = null;string curdate = null;string overdate = null;int half = 0;string gpname = null;int width = 1050;//K线图矩形宽int height = 400;//K线图矩形高int leftX = 40;//k线图矩形原始坐标Xint topY = 80;//k线图矩形原始坐标Y//按钮加载K线private void button1_Click(obje.
2020-11-10 14:57:43 1744
原创 C#画K线实现加载不同股票和5,10,20,60均线
//按钮加载K线private void button1_Click(object sender, EventArgs e){if (this.comboBox1.Text == “热点”){gpname = “zhy” + this.textBox1.Text.Trim();}else{gpname =this.textBox1.Text.Trim();}if (gpname != “zhy”){int count = 10;half = count;//string j..
2020-11-09 10:56:33 656
原创 C#画K线实现加载均线(5日,10日)
//按钮加载K线private void button1_Click(object sender, EventArgs e){int count = int.Parse(this.comboBox1.Text.Trim());half = count;string jintian = DateTime.Now.ToShortDateString().ToString();curdate = jintian;begindate = jintian;this.Refresh();string.
2020-11-06 15:44:33 628
原创 C#画K线实现方向键放大缩小K线及左右移动K线
/// /// 比较两个日期字符串大小/// /// /// /// public int CompareDate(string dateStr1, string dateStr2){//将日期字符串转换为日期对象DateTime t1 = Convert.ToDateTime(dateStr1);DateTime t2 = Convert.ToDateTime(dateStr2);//通过DateTIme.Compare()进行比较()int compNum = DateTim..
2020-11-05 17:25:33 1326
原创 c#画K线实现多个股票价格的动态加载
private void button1_Click(object sender, EventArgs e){int count = int.Parse(this.comboBox1.Text.Trim());this.Refresh();Graphics g = CreateGraphics();huatu(g,count);}private void huatu(Graphics g,int num){Pen p = new Pen(Color.Red, 1);//上涨Pen ...
2020-11-04 18:08:55 627 1
原创 C#画K线实现动态加载不同数量的K线
private void button1_Click(object sender, EventArgs e)//按钮{int count = int.Parse(this.comboBox1.Text.Trim());this.Refresh();Graphics g = CreateGraphics();huatu(g,count);}private void huatu(Graphics g,int num)//画K线方法{//Graphics g = CreateGraphic...
2020-11-04 14:58:36 203
原创 C#画K线实现纵轴价格和横轴日期动态变化
Graphics g = e.Graphics;Pen p = new Pen(Color.Red, 1);//上涨Pen p1 = new Pen(Color.Green, 1);//下跌int width = 600;int height = 400;g.DrawRectangle(p, 80, 80, width, height);//k线开始Font myFont = new Font(“微软雅黑”, 8);//float angle = 20; //角度float x = 0..
2020-11-04 10:51:35 432
原创 C#画K线(20200623)实现连接数据库动态读取K线数据
private void Kxian_Paint(object sender, PaintEventArgs e){ Graphics g = e.Graphics; Pen p = new Pen(Color.Red, 1);//上涨 Pen p1 = new Pen(Color.Green, 1);//下跌 g.DrawRectangle(p, 80, 80, 600, 400); //k线开始 Font.
2020-11-03 10:56:05 545
原创 C#画K线实现K线涨跌
private void Kxian_Paint(object sender, PaintEventArgs e){ Graphics g = e.Graphics; Pen p = new Pen(Color.Red, 1);//上涨 Pen p1 = new Pen(Color.Green, 1);//下跌 g.DrawRectangle(p, 80, 80, 600, 400); //k线开始 stri.
2020-11-02 13:46:12 884
原创 C#画K线(20201030)实现K线价格画K线
private void Kxian_Paint(object sender, PaintEventArgs e){ Graphics g = e.Graphics; Pen p = new Pen(Color.Red, 1); g.DrawRectangle(p, 80, 80, 600, 400); **//k线开始 string[][] data = new string[6][]; data[0] =.
2020-10-30 16:47:33 725
原创 C#股票K线2-横柱倾斜20度(20201014)
private void Kxian_Paint(object sender, PaintEventArgs e){Graphics g = e.Graphics;Pen p = new Pen(Color.Red, 1);//g.DrawRectangle(p, new Rectangle(200, 100, 20, 50));g.DrawRectangle(p, 80, 80, 600, 400);//k线开始g.DrawLine(p, 210, 200, 210, 185);g.Dra
2020-10-14 17:34:06 299
原创 C#画K线(20201010)
private void Kxian_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Pen p = new Pen(Color.Red, 1); //g.DrawRectangle(p, new Rectangle(200, 100, 20, 50)); g.DrawRectangle(p, 80, 80, 600, 400); ...
2020-10-10 18:08:45 816
原创 C#开发K线图
由于工作需要开发一个股票小程序,在网上搜了搜相关的资料,决定试着用MSCHART 开发,在这里每天记录一下自己的开发过程,希望开发过程中有高手多多交流,开发成功以后把源程序公开
2020-05-19 17:13:41 1572
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人