等级: 免费版
- 注册:
- 2022-11-7
- 曾用名:
|
call Secpztradetime(stkname,secondsperiod) ‘计算5秒钟周期的K线的各K线结束时间
sectodaybar = secmytodaybar(StkName) ‘计算5秒钟周期的K线数量
set hissec = MarketData.GetHistoryData(stklabel,marketname,12,sectodaybar,5)’引用当日的所有5秒钟K线的历史数据
if IsObject(hissec)=true then
dataseccount = hissec.count
'Application.MsgOut StkLabel&":dataseccount="&dataseccount
'call Document.WritePrivateProfileString("5secprice","dataseccount",dataseccount,"D:\documents\personaldocs\jzt\Wvba\"&StkName&"5secprice.ini")
If dataseccount<> sectodaybar Then
Application.MsgOut StkLabel&",5秒钟数据数量="&dataseccount&"不等于K线的数据数量:"§odaybar
Application.MsgOut StkLabel&",需补充5秒数据后再运行VBA,交易"
application.PostMessage(32797)
Else
|
|