Sub Test2()
'1.打开金字塔,依次打开"菜单-->工具-->选项-->常规",把"多分钟线数"设置为5,确定
'2.重新打开金字塔软件
'3.连续运行本程序两次,观察两次输出的时间的间隔,呵呵
dim hd,cycle,cycleMore,needDataCount
dim count,i
cycle=13 '多分钟线
cycleMore=6 '定义多分钟线:6分钟
needDataCount=10'获取10个数据
set hd=MarketData.GetHistoryData("IF08","ZJ",cycle,needDataCount,cycleMore)
count=hd.Count-1
for i=count to 0 step -1
Application.MsgOut "时间=" & hd.Date(i) & ",收盘价=" & hd.Close(i)
next
set hd=Nothing
Application.MsgOut "----------------------------"
End Sub
count=hd.Count-1
我是倒序用
你确定跑过代码?
你确定跑过代码?