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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 平仓信号出现白箭头

   

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


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

主题:平仓信号出现白箭头

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


加好友 发短信
等级:论坛游民 帖子:169 积分:0 威望:0 精华:0 注册:2016/8/28 16:11:16
平仓信号出现白箭头  发帖心情 Post By:2016/11/16 9:31:28    Post IP:116.29.227.163[显示全部帖子]



平仓信号出现白箭头,是什么原因?
平仓逻辑清晰:1,持仓enterbars>1 ,持仓周期大于3周期收盘价平仓;
                    2,止盈h>=enterprice+p2/1000*enterprice 
                              l>=enterprice-p2/1000*enterprice 
                             最高价或最低价达到指定价平仓
                    3,止损l<=enterprice-p1/1000*enterprice 
                              h>=enterprice+p1/1000*enterprice 
                               最低价或最高价达到指定价平仓
if holding>0 then begin 
        if enterbars>1 then begin 
           sell(1,holding,limitr,close);
           //sell(1,holding,marketr);
           myexitprice:=0; 
          end
     if h>=enterprice+p2/1000*enterprice then begin
        myexitprice:=enterprice+p2/1000*enterprice;
        //sell(1,holding,marketr); 
        sell(1,holding,limitr,myexitprice); 
         myexitprice:=0;
       end
    
      if l<=enterprice-p1/1000*enterprice then begin
         myexitprice:=enterprice-p1/1000*enterprice;
         //sell(1,holding,marketr); 
        sell(1,holding,limitr,myexitprice); 
         myexitprice:=0;
       end 
    end
 

//盈亏计算 
     if holding<0 then begin
       if enterbars>1 then begin 
          sellshort(1,holding,limitr,close);
          //sellshort(1,holding,marketr);
          myexitprice:=0;
         end
      if l>=enterprice-p2/1000*enterprice then begin
         myexitprice:=enterprice-p2/1000*enterprice;
         //sellshort(1,holding,marketr); 
         sellshort(1,holding,limitr,myexitprice); 
         myexitprice:=0;
       end
   
      if h>=enterprice+p1/1000*enterprice then begin
         myexitprice:=enterprice+p1/1000*enterprice;
         //sellshort(1,holding,marketr); 
         sellshort(1,holding,limitr,myexitprice); 
         myexitprice:=0;
       end 
    end

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


加好友 发短信
等级:论坛游民 帖子:169 积分:0 威望:0 精华:0 注册:2016/8/28 16:11:16
  发帖心情 Post By:2016/11/16 11:09:02    Post IP:183.43.148.64[显示全部帖子]

      1,很奇怪回测多头没有白箭头,只有空头止盈才会有!!!
     
       2,止盈指令没有用,不管参数多少结果一样
       
       3,止盈编写有问题?

 回到顶部