等级: 免费版
- 注册:
- 2021-5-31
- 曾用名:
|
代码如下:
Sub APPLICATION_VBAStart()
Call MarketData.RegReportNotify("510300","SH")
End Sub
Sub APPLICATION_VBAEnd()
Call MarketData.UnRegReportNotify("510300","SH")
End Sub
Sub MARKETDATA_ReportNotify(ReportData)
Set History=marketdata.GetHistoryData("510300","SH",2)
close = History.Close(History.Count-1)
open = History.Open(History.Count-1)
high = History.High(History.Count-1)
low = History.Low(History.Count-1)
dt=history.Date(History.Count-1)
Application.Msgout "notify_time:" & Cdate(ReportData.Date) & ", bar_time:" & Cdate(dt) & " bardata close:" & close & ",high:" & high & ",low:" & low & ",open:" & open
End Sub
系统输出显示,每一次通知,都打印了三次,那是不是意味着有一个新的行情过来,MARKETDATA_ReportNotify会执行三次?这个问题怎么解决?
|
|