等级: 免费版
- 注册:
- 2022-11-7
- 曾用名:
|
Set hisshort = CreateObject("Stock.Array")
set hisshort = MarketData.GetHistoryData(stklabel,marketname,cyctype,kcount)
datashortcount = hisshort.count
Application.PeekAndPump
call pztradetime(stkname)
ReDim hisshortprice(datashortcount)
ReDim hisshortdate(datashortcount)
If kcount > datashortcount Then
Application.MsgOut StkLabel&",短周期分钟数据数量="&datashortcount&"少于需要的数据数量:"&kcount
Application.MsgOut StkLabel&",需补充5分钟数据后再运行VBA,交易"
application.PostMessage(32797)
Else
dim ishort
ReDim timeshort(datashortcount)
ReDim timeshorttojzt(datashortcount)
ReDim dateshorttojzt(datashortcount)
For ishort = datashortcount - 1 To 0 Step -1
hisshortprice(ishort) = hisshort.close(ishort)'===============>怎么会运行过程中说缺少对象呢?
'shortopenint(ishort) = hisshort.Openint(ishort)
hisshortdate(ishort) = hisshort.date(ishort)
|
|