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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → [原创]移动止损后台交易模板

   

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


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

主题:[原创]移动止损后台交易模板

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


加好友 发短信
等级:新手上路 帖子:15 积分:90 威望:0 精华:0 注册:2010/11/4 17:53:02
  发帖心情 Post By:2011/1/14 17:35:08    Post IP:113.124.112.103[只看该作者]


 input:stopnum(20,5,50,5);
 runmode:1;
 
 if tholding=0 then begin
     extgbdataset('stopprice',low-stopnum*mindiff);
     tbuy(1,1,lmt,close);
 end;
 
 if tholding>0 then begin
     if low-stopnum*mindiff>extgbdata('stopprice') then
         extgbdataset('stopprice',low-stopnum*mindiff);
     
     if low<=extgbdata('stopprice') then begin
         tsell(1,tholding,lmt,extgbdata('stopprice')),orderqueue;
         tbuyshort(1,1,lmt,extgbdata('stopprice')),orderqueue;
     end;
 end;

 if tholding<0 then begin
     if high+stopnum*mindiff<extgbdata('stopprice') then
         extgbdataset('stopprice',high+stopnum*mindiff);
    
     if high>=extgbdata('stopprice') then begin
         tsellshort(1,tholding,lmt,extgbdata('stopprice')),orderqueue;
         tbuy(1,1,lmt,extgbdata('stopprice')),orderqueue;
     end;    
 end;

 

 

无法通过!


 回到顶部