Rss & SiteMap

金字塔客服中心 - 专业程序化交易软件提供商 http://www.weistock.com/bbs/

专业程序化软件提供商
共2 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:交易时间撤单模块

1楼
rushtaotao 发表于:2013/8/1 14:42:46
function CancelAllOrder(sAccount) '撤销所有委托
Document.DebugFile "C:\OrderLog.Txt","撤单模块启动"& sAccount,1
     dim Orderid   '订单ID
     dim Filled   '提交手数
     dim Remaining  '剩余手数
     dim Action   '买卖
     dim OrderType  '订单类型
     dim LmtPrice  '委托价
     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
2楼
rushtaotao 发表于:2013/8/1 14:44:50
如果不是交易时间 三所和中金冲突 如果账户内有中金和3所单子 在小节休息时会有所影响 希望这帖子帮到大家
共2 条记录, 每页显示 10 条, 页签: [1]


Powered By Dvbbs Version 8.3.0
Processed in 0.01953 s, 2 queries.