交易時(shí)間撤單模塊 [金字塔]
- 咨詢內(nèi)容:
function CancelAllOrder(sAccount) '撤銷所有委托
Document.DebugFile "C:\OrderLog.Txt","撤單模塊啟動(dòng)"& sAccount,1
dim Orderid '訂單ID
dim Filled '提交手?jǐn)?shù)
dim Remaining '剩余手?jǐn)?shù)
dim Action '買賣
dim OrderType '訂單類型
dim LmtPrice '委托價(jià)
dim Account '賬戶
dim Kaiping '開平
dim code
dim t1
t1=TimeValue(Now())
PendingCount=Order.OrderNum2
For i=0 to PendingCount-1
Call Order.OrderInfo2(i,OrderID,ConSign,Filled,Remaining,Action,OrderType,LmtPrice,Account,Kaiping,Code,Market)
'application.MsgOut sAccount & " ---"&OrderID &"---!!"&Code &"===="&Market
Document.DebugFile "C:\OrderLog.Txt",sAccount & " ---"&OrderID &"---!!"&Code &"===="&Market,1
if Account=sAccount then
if Market = "ZJ" and ((t1>TimeValue("09:10") and t1<TimeValue("11:30")) or (t1>TimeValue("13:00") and t1<TimeValue("15:15"))) then
call order.CancelOrder(OrderID)
Document.DebugFile "C:\OrderLog.Txt","中金盤中撤單"&Market,1
end if
if (Market ="SQ" or Market="DQ" or Market="ZQ") and ( (t1>TimeValue("09:00") and t1<TimeValue("10:15")) or (t1>TimeValue("10:30") and t1<TimeValue("11:30")) or (t1>TimeValue("13:30") and t1<TimeValue("15:00") ) ) then
call order.CancelOrder(OrderID)
Document.DebugFile "C:\OrderLog.Txt","三所盤中撤單"&Market,1
end if
if Market = "ZJ" and (t1>TimeValue("09:10") and t1<TimeValue("11:30")) or (t1>TimeValue("13:00") and t1<TimeValue("15:15")) then
application.MsgOut "!!!!!!!!!!!!!!!!!!!!"
'Document.DebugFile "C:\OrderLog.Txt","!!!!!!!!!!!!!!!!!!!!",1
end if
end if
Next
End function - 金字塔客服: 如果不是交易時(shí)間 三所和中金沖突 如果賬戶內(nèi)有中金和3所單子 在小節(jié)休息時(shí)會(huì)有所影響 希望這帖子幫到大家
有思路,想編寫各種指標(biāo)公式,程序化交易模型,選股公式,預(yù)警公式的朋友
可聯(lián)系技術(shù)人員 QQ: 1145508240 進(jìn)行 有償 編寫!(不貴!點(diǎn)擊查看價(jià)格!)
相關(guān)文章
-
沒有相關(guān)內(nèi)容