欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件高级功能研发区 → 交易时间撤单模块

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有2250人关注过本帖树形打印复制链接

主题:交易时间撤单模块

帅哥哟,离线,有人找我吗?
rushtaotao
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 czt
等级:蜘蛛侠 帖子:1445 积分:6114 威望:0 精华:3 注册:2012/1/16 10:31:19
交易时间撤单模块  发帖心情 Post By: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

 回到顶部
帅哥哟,离线,有人找我吗?
rushtaotao
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信 czt
等级:蜘蛛侠 帖子:1445 积分:6114 威望:0 精华:3 注册:2012/1/16 10:31:19
  发帖心情 Post By:2013/8/1 14:44:50 [显示全部帖子]

如果不是交易时间 三所和中金冲突 如果账户内有中金和3所单子 在小节休息时会有所影响 希望这帖子帮到大家

 回到顶部