這段代碼有錯嗎 [金字塔]
- 咨詢內容:
if not(wucode) then
set Report1 = MarketData.GetReportData(Code,Market1)
if i=0 then
MaxVolume = Report1.Volume
end if
If Report1.Volume = MaxVolume Then
MaxCode = Report1.Label
'MaxVolume = Report1.Volume
End if
end if每次升級后都提示“If Report1.Volume = MaxVolume Then”這句424錯誤。
- 金字塔客服:
管理員了
- 用戶回復:
MarketData.GetReportData(Code,Market1)
你仔細檢查一下 Code,Market1 這兩個變量的品種是不是系統里面沒有,沒有的話Report1 對象就是控制,自然就會出現問題。
為了防止出現異常,建議你的代碼中涉及到對象引用時,要加以對象是否為空的判斷
set Report1 = MarketData.GetReportData(Code,Market1)
if not(Report1 is nothing) then
'相應的處理
end if - 網友回復:
if not(wucode) then
這句就是對對象是否為空的判斷。
有思路,想編寫各種指標公式,程序化交易模型,選股公式,預警公式的朋友
可聯系技術人員 QQ: 1145508240 進行 有償 編寫!(不貴!點擊查看價格!)
相關文章
-
沒有相關內容