高分求像股票一样的k线图控件,我受够了vb中的图表控件了

cqhydz 2002-06-08 11:53:13
高分求像股票一样的k线图控件,我受够了vb中的图表控件了
...全文
813 27 打赏 收藏 转发到动态 举报
写回复
用AI写文章
27 条回复
切换为时间正序
请发表友善的回复…
发表回复
killideadd 2002-06-25
  • 打赏
  • 举报
回复
vb用api可以很做到。
速度不慢的
cqhydz 2002-06-10
  • 打赏
  • 举报
回复
vb速度太慢有没有相近的图表控件作参考
_1_ 2002-06-10
  • 打赏
  • 举报
回复
没有用啥特殊的控件
picturebox上用line画的
cqhydz 2002-06-10
  • 打赏
  • 举报
回复
有人知道?
cqhydz 2002-06-10
  • 打赏
  • 举报
回复
好谢了
_1_ 2002-06-10
  • 打赏
  • 举报
回复
开发文档,不能提供
你还是慢慢写吧~~ 有问题的时候再提好了
_1_ 2002-06-10
  • 打赏
  • 举报
回复
顺便告诉你一下, 我也做股票的

我以前公司写的股票软件的操作是完全仿造钱龙的操作的

连全部功能键也是设置成一样的
cqhydz 2002-06-10
  • 打赏
  • 举报
回复
能提供点开发的方法经验和开发文档?
_1_ 2002-06-10
  • 打赏
  • 举报
回复
我用这东西一样可以做到 钱龙 里一样的, 当然做技术指标比较困难的

我现在很明确的告诉你, 没有这样现成的控件的,

我做的这个游戏也算实现了,上下键放大和缩小 左右键移动 ,

鼠标移动自动显示当前的价位的

我以前的公司也是这样完成一整套的股票软件的......

还是那句话, 不要想太多的现成的东西....有些东西还是要自己写的

cqhydz 2002-06-10
  • 打赏
  • 举报
回复
就像(股票软件 钱龙)中的哪样
_1_ 2002-06-10
  • 打赏
  • 举报
回复
你还想画啥的??
MACD还是 KDJ 还是干啥! 你到底想要实现啥功能 ???
cqhydz 2002-06-10
  • 打赏
  • 举报
回复
mschart数据一多就慢得要命
_1_(杂牌军营jinesc.6600.org) 我以前的贴子中见过你的这段代码但还是简单了
还是感谢你.
cqhydz 2002-06-10
  • 打赏
  • 举报
回复
mschart数据一多就慢得要命
_1_(杂牌军营jinesc.6600.org) 我以前的贴子中见过你的这段代码但还是简单了
还是感谢你.
cqhydz 2002-06-10
  • 打赏
  • 举报
回复
mschart数据一多就慢得要命
_1_(杂牌军营jinesc.6600.org) 我以前的贴子中见过你的这段代码但不简单了
还是感谢你.
_1_ 2002-06-10
  • 打赏
  • 举报
回复
这种东西有啥好偷懒的呀, 不就是用line去一根根的画呀

我上面的代码并没有优化的 mschart怎么也没有自己写的灵活呀
Lzh_lee 2002-06-10
  • 打赏
  • 举报
回复
为什么呢,如果你只是要实现k线图的功能,用mschart控件应该是很容易的呀。要不就用水晶报表吧。
_1_ 2002-06-10
  • 打赏
  • 举报
回复
Private Sub DrawAvangeKline(picBroad As PictureBox, CurJL As Long, ts As Long, maxhigh As Double, minlow As Double, AvangeTs As Long, DrawColor As Long) '画K线
'画均线
Dim i As Long
Dim MaxJL As Long
Dim PointValue() As Double
Dim j As Long
Dim StartX As Double, StartY As Double
picBroad.Scale
If CurJL + ts > UBound(hq) Then
MaxJL = UBound(hq)
Else
MaxJL = CurJL + ts
End If
ReDim PointValue(CurJL To MaxJL)
picBroad.Scale (CurJL, maxhigh)-(CurJL + ts + 1, minlow)

For i = CurJL To MaxJL
If i >= AvangeTs Then
PointValue(i) = 0
For j = i - AvangeTs + 1 To i
PointValue(i) = PointValue(i) + hq(j).spj
Next
PointValue(i) = PointValue(i) / AvangeTs
If i > CurJL Then
picBroad.Line (StartX, StartY)-(i + 0.8, PointValue(i)), DrawColor
StartX = i + 0.8
StartY = PointValue(i)
Else
StartX = i
StartY = PointValue(i)
End If
Else
PointValue(i) = 0
End If
Next
End Sub


上面是我的代码, 你自己去改一下吧, 反正是通用模块的
_1_ 2002-06-10
  • 打赏
  • 举报
回复
Private Sub DrawVolume(picBroad As PictureBox, CurJL As Long, ts As Long, maxhigh As Double, minlow As Double) '画成交量
Dim DrawColor As Long
Dim i As Long
Dim MaxJL As Long

picBroad.Cls
picBroad.Scale
If CurJL + ts > UBound(hq) Then
MaxJL = UBound(hq)
Else
MaxJL = CurJL + ts
End If

picBroad.Scale (CurJL, maxhigh)-(CurJL + ts + 1, minlow)
For i = CurJL To MaxJL
If hq(i).spj > hq(i).kpj Then
DrawColor = QBColor(12)
ElseIf hq(i).spj < hq(i).kpj Then
DrawColor = QBColor(10)
Else
DrawColor = QBColor(15)
End If
picBroad.Line (i + 0.2, hq(i).cjl)-(i + 0.8, minlow), DrawColor, BF

Next
End Sub
_1_ 2002-06-10
  • 打赏
  • 举报
回复
真麻烦:
我再发个吧, 你看看吧
Private Sub DrawKLine(picBroad As PictureBox, CurJL As Long, ts As Long, maxhigh As Double, minlow As Double)
'画K线
Dim DrawColor As Long
Dim i As Long
Dim MaxJL As Long

picBroad.Cls
picBroad.Scale
If CurJL + ts > UBound(hq) Then
MaxJL = UBound(hq)
Else
MaxJL = CurJL + ts
End If

picBroad.Scale (CurJL, maxhigh)-(CurJL + ts + 1, minlow)
For i = CurJL To MaxJL
If hq(i).spj > hq(i).kpj Then
DrawColor = QBColor(12)
ElseIf hq(i).spj < hq(i).kpj Then
DrawColor = QBColor(10)
Else
DrawColor = QBColor(15)
End If
picBroad.Line (i + 0.2, hq(i).kpj)-(i + 0.8, hq(i).spj), DrawColor, BF
picBroad.Line (i + 0.5, hq(i).zgj)-(i + 0.5, hq(i).zdj), DrawColor
Next
End Sub
cqhydz 2002-06-10
  • 打赏
  • 举报
回复
Delphi的TChart功能也太弱主要是没有经验谁能传授一点在图形方面的技术
加载更多回复(7)

1,451

社区成员

发帖
与我相关
我的任务
社区描述
VB 控件
社区管理员
  • 控件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧