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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件高级功能研发区 → [求助]求助代码

   

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


  共有2789人关注过本帖平板打印复制链接

主题:[求助]求助代码

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


加好友 发短信 ateam
等级:论坛游侠 帖子:414 积分:0 威望:0 精华:0 注册:2016/12/8 10:33:23
  发帖心情 Post By:2016/12/21 15:24:38 [只看该作者]

另外,请问orderstatusex2事件是自带返回time变量么?


Sub ORDER_OrderStatusEx2(OrderID, Status, Filled, Remaining, Price, Code, Market, OrderType, Aspect, Kaiping,Account, AccountType)

 '账户类型 0 IB 1 CTP 2 金仕达 3其他

Dim sStatus       '成交状态 

If AccountType=0 then

sAccType="0.IB"

ElseIf AccountType=1 then

sAccType="1.CTP"

ElseIf AccountType=2 then

sAccType="2.金士达"

End if 

 

If AccountType=0 then

sStatus="FILLED"

ElseIf AccountType=1 then

sStatus="TRADEING"

lseIf AccountType=2 then

sStatus="FILLED"

End if

 

If UCase(Status)="FILLED" then  '只跟踪成交的单 

if Aspect=0 and Kaiping=0 then '买入

Call Document.SetExtString("Order-Buy-time",time)     '成交时间

Call Document.SetExtData("Order-B-Price",Price)   '成交价格

Call Document.SetExtData("Order-B-Vol",Filled)   '成交手数

Call Document.SetExtData("Order-B-OrderID",OrderID)  '成交单号

end if

      End if 
    End Sub  


 回到顶部