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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → [求助]图表转化为后台自动下单

   

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


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

主题:[求助]图表转化为后台自动下单

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


加好友 发短信
等级:论坛游民 帖子:246 积分:0 威望:0 精华:0 注册:2015/7/20 9:05:58
  发帖心情 Post By:2015/8/10 8:17:15    Post IP:125.91.24.242[只看该作者]

请问如何结合起来呢?目前我两个思路
1 把下单模板红色部分换成//我自定义的
if cond0 then begin
 ...
if cond1 and (holding=0)then begin
BUY(1,B04,LIMITR,A01,1);
开盘开多:=1;
...
end 

if cond2 then begin
BUYSHORT(1,B04,LIMITR,A01,1);
开盘开空:=1;
...
end 


GOTO CONTINUELINE@;
end

if cond3 then begin
SELL(1,B04,LIMITR,A02,1); 
开盘开多后平多:=1;
...
if cond4 then begin
BUYSHORT(1,B04,LIMITR,A01,1); 
平多后开空:=1;
...
end 

end


if cond5 then begin
SELLSHORT(1,B04,LIMITR,A02,1);
开盘开空后平空:=1;
...
if cond6 then begin
BUY(1,B04,LIMITR,A01,1);
平空后开多:=1;
...
end 

end

CONTINUELINE@;

cc:=holding;
if holding>0 and c<ref(c,1) then sell(1,1,market);//开盘开多后平多:=1 
if holding<0 and c>ref(c,1) then sellshort(1,1,market);//开盘开空后平空:=1  
if holding=0 and c>ref(c,1) then buy(1,1,market); //开盘开多:=1;  平空后开多:=1;
if holding=0 and c<ref(c,1) then buyshort(1,1,market);//开盘开空:=1;
if not(islastbar) or workmode<>1 then exit;
tm:=30;//撤单时间
ac:='800988';//下单账户
wt:=tremainqty(0,ac,stklabel);
buyhold:=tbuyholdingex(ac,stklabel,1);
sellhold:=tsellholdingex(ac,stklabel,1);
if wt>0.5 and tsubmit(0)>tm then tcancelex(1,0,ac,stklabel);//如果用软件自带的撤单功能,这句删除。
if wt<0.5 then begin
 kc1:=max(cc,0)-buyhold;
 kc2:=abs(min(cc,0))-sellhold;
 if kc1<-0.5 then tsell(1,abs(kc1),mkt,0,0,ac),allowrepeat;
 if kc2<-0.5 then tsellshort(1,abs(kc2),mkt,0,0,ac),allowrepeat;
 if sellhold<0.5 and kc1>0.5 then tbuy(1,kc1,mkt,0,0,ac),allowrepeat;
 if buyhold<0.5  and kc2>0.5 then tbuyshort(1,kc2,mkt,0,0,ac),allowrepeat;
end

 回到顶部
总数 25 1 2 3 下一页