還是關(guān)于自動連接的問題 [金字塔]
- 咨詢內(nèi)容:
這是我早上VBA自動連接后的截圖
此主題相關(guān)圖片如下:捕獲.jpg
在交易時段,我通過 VBA每一分鐘自動判斷當(dāng)前是否連接。從截圖可以看到,通過VBA連接后,股票行情處于“連接中”狀態(tài),但VBA函數(shù)去判斷連接狀態(tài)時,對于“連接中”的狀態(tài)也是返回1,即默認(rèn)已連接,但事實上并沒有連接成功。 - 金字塔客服:
檢測部分的VBA代碼貼下
- 用戶回復(fù):
if ttt>cdate("08:56:00") and ttt<cdate("15:15:00") and application.ReceiveDatastatus=0 then call application.ReceiveData(1) application.MsgOut "已連接! "&date()&" "&time() end if if ttt>cdate("15:15:00") and application.ReceiveDatastatus then call application.ReceiveData(0) application.MsgOut "斷開連接! "&date()&" "&time() end if
這個是每天開盤前自動連接,收盤后自動斷開! - 網(wǎng)友回復(fù):
if oautoit.winexists("金字塔") then call oautoit.WinClose("金字塔") 'call oautoit.sleep(1000) application.MsgOut "斷線了!"&date()&" "&time() call application.ReceiveData(0) end ifif ttt>cdate("08:56:00") and ttt<cdate("15:15:00") and application.ReceiveDatastatus=0 then call application.ReceiveData(1) application.MsgOut "已連接! "&date()&" "&time() end if if ttt>cdate("15:15:00") and application.ReceiveDatastatus then call application.ReceiveData(0) application.MsgOut "斷開連接! "&date()&" "&time() end if
這段是VBA中的代碼,通過每分鐘中斷一次來調(diào)用。當(dāng)出現(xiàn)斷線時,會彈出“金字塔”的斷線窗口,通過判斷是否存在該窗口,來判斷是否斷線 !下面是 每天開盤前自動連接,收盤后自動斷開! - 網(wǎng)友回復(fù): 1,帖子轉(zhuǎn)至高級功能研發(fā)區(qū)。等待相關(guān)人員處理,謝謝
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 1145508240 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容