VBA能否编写自动补充指定品种数据 [金字塔]
- 咨询内容:
我想偷懒,哈哈。有没有可以用VBA编写自动补充指定品种的历史行情数据的,给个思路就行;
下面是论坛精华里的自动补分笔数据,是不是按照这个类似的,代码不是看得太懂;
Sub SJBC()
'16~17点开始补分笔数据
if application.ReceiveDataStatus=0 then application.ReceiveData(1)
Application.PeekAndPump
application.SendMessage(33882)
call application.Settimer(1,600000)
call application.Settimer(2,9000000)
Set Wrap = CreateObject("DynamicWrapper")
Wrap.Register "user32.dll","FindWindowA","i=ss","f=s", "r=l"
Wrap.Register "user32.dll","FindWindowExA","i=llss","f=s", "r=l"
Wrap.Register "user32.dll","SendMessageA","i=lull","f=s", "r=l"
h = Wrap.FindWindowA("#32770","数据接收")
tab=Wrap.FindWindowExA(h,0,"SysTabControl32","")
TCM_SETCURFOCUS=4912
WM_SETFOCUS=7
WM_KEYDOWN=256
WM_KEYUP=257
BM_CLICK=245
Wrap.SendMessageA tab,TCM_SETCURFOCUS,2,0
h1=Wrap.FindWindowExA(h,0,"#32770","自定义补数据")
cb=Wrap.FindWindowExA(h1,0,"ComboBox","")
Wrap.SendMessageA cb,WM_SETFOCUS,0,0
Wrap.SendMessageA cb,WM_KEYDOWN,VK_DOWN,0
Wrap.SendMessageA cb,WM_KEYUP,VK_DOWN,0
bt=0
bt=Wrap.FindWindowExA(h1,0,"Button","开始补充")
Wrap.SendMessageA bt,BM_CLICK,0,0
if bt<>0 then todayhas=1
End Sub - 金字塔客服:
VBA不提供直接的方法操作补数据,你帖子提到的代码是通过WINDOWS的API通过模拟鼠标操作来实现自动数据补充的
- 用户回复: 谢谢回复,我知道了!那我还是自己点点好了;谢谢!
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 1145508240 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容