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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件高级功能研发区 → [求助]如何实现跟限价单?

   

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


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

主题:[求助]如何实现跟限价单?

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


加好友 发短信
等级:黑侠 帖子:628 积分:2193 威望:0 精华:0 注册:2010/5/27 11:25:08
[求助]如何实现跟限价单?  发帖心情 Post By:2016/4/6 9:35:19 [只看该作者]

A帐户~
1913买入1手c09
B帐户执行同样操作~
下面这个是跟3分之1的单子~不过是通过成交回报~
我需要的是跟限价单的操作~
谁能帮我改一下代码?

以下内容为程序代码:

1
2 Sub ORDER_OrderStatusEx2(OrderID, Status, Filled, Remaining, Price, Code, Market, OrderType, Aspect, Kaiping, Account, AccountType)
3 if Status="Tradeing" and filled>0 and Account="800007" and StrComp(Code,"IF12")<>0 then
4 'if Status="Tradeing" and filled>0 and Account="800007" then
5
6 Call Order.HoldingInfoByCode2(Code, Market, BuyHoding_1, BuyCost_1, BuyTodayHoding_1, SellHoding_1, SellCost_1, SellTodayHoding_1, PNL_1, UseMargin_1,Account)
7 Call Order.HoldingInfoByCode2(Code, Market, BuyHoding_2, BuyCost_2, BuyTodayHoding_2, SellHoding_2, SellCost_2, SellTodayHoding_2, PNL_2, UseMargin_2,"800052")
8
9 if round(BuyHoding_1/3)>BuyHoding_2 then order.Buy 1,round(BuyHoding_1/3)-BuyHoding_2,0,0,code,market,"800052",0
10 if round(BuyHoding_1/3)<BuyHoding_2 then order.Sell 1,BuyHoding_2-round(BuyHoding_1/3),0,0,code,market,"800052",0
11 if round(SellHoding_1/3)>SellHoding_2 then order.Buyshort 1,round(SellHoding_1/3)-SellHoding_2,0,0,code,market,"800052",0
12 if round(SellHoding_1/3)<SellHoding_2 then order.sellshort 1,SellHoding_2-round(SellHoding_1/3),0,0,code,market,"800052",0
13
14 end if
15 End Sub


 回到顶部