這段代碼有錯(cuò)嗎 [金字塔]
- 咨詢內(nèi)容:
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錯(cuò)誤。
- 金字塔客服:
管理員了
- 用戶回復(fù):
MarketData.GetReportData(Code,Market1)
你仔細(xì)檢查一下 Code,Market1 這兩個(gè)變量的品種是不是系統(tǒng)里面沒有,沒有的話Report1 對象就是控制,自然就會(huì)出現(xiàn)問題。
為了防止出現(xiàn)異常,建議你的代碼中涉及到對象引用時(shí),要加以對象是否為空的判斷
set Report1 = MarketData.GetReportData(Code,Market1)
if not(Report1 is nothing) then
'相應(yīng)的處理
end if - 網(wǎng)友回復(fù):
if not(wucode) then
這句就是對對象是否為空的判斷。
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 1145508240 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容