區分reportnotify里面的reportdata [金字塔]
- 咨詢內容:
代碼:
Sub UserForm1_CommandButton1_Click()
call marketdata.RegReportNotify("cu00","sy")
call marketdata.RegReportNotify("ag00","sy")
End Sub
sub marketdata_reportnotify(reportdata)
dim newprice_cu,newprice_ag
if reportdata.label="cu00" then
newprice_cu=reportdata.newprice
application.MsgOut "newprice_cu:"& newprice_cu
else
newprice_ag=reportdata.newprice
application.MsgOut "newprice_ag:"& newprice_ag
end if
end sub
Sub UserForm1_CommandButton2_Click()
application.MsgOut time
call marketdata.UnRegReportNotify("cu00","sy")
call marketdata.UnRegReportNotify("ag00","sy")
End Sub執行效果:
newprice_ag:4316
newprice_ag:4316
newprice_ag:49560
newprice_ag:4316
newprice_ag:4315
newprice_ag:49560
newprice_ag:4315也就是說,label這個屬性并沒有起到區分兩個品種的作用。那該怎么樣才能區分呢?
- 金字塔客服:
難道你不會
application.MsgOut reportdata.label
這樣輸出一下標簽內容,看看金字塔是怎么樣的格式?
- 用戶回復:
是"AG00""CU00",不是"ag00""cu00"
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 1145508240 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容