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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → [求助]同步

   

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


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

主题:[求助]同步

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


加好友 发短信
等级:新手上路 帖子:29 积分:165 威望:0 精华:0 注册:2012/9/29 7:50:08
交易划线按钮的建议  发帖心情 Post By:2012/10/29 18:04:37    Post IP:183.190.193.127[只看该作者]

VarIABLE:  kd=0, kk=0 ;
   
    收益:asset,noaxis,colorred ;
    可用现金:CASH(0),LINETHICK0;
    持仓:HOLDING,LINETHICK0; 

   

    entertime:= TIME<=145900 AND TIME>=090100 ;
      
      if 平空 and kk=1 and enterbars > 0  AND  entertime then  begin        
       sellShort (  holding < 0 ,0 , limitr, o);
        if holding = 0 then
        kk:=0;
        end  
    
      if 开多 and kd=0 and  entertime then  begin     
       Buy (  holding= 0 , 1- holding, limitr, o) ;
        if holding =1 then 
             kd:=1;
          end  
      
      if 平多 and kd=1 AND  entertime and enterbars > 0 then   begin      
       sell (  holding > 0 , 0 , limitr, o) ;
        if holding = 0 then
        kd:=0;
        end
        

      if 开空 and kk=0 and entertime then  begin        
       buyshort(holding = 0  , 1+holding ,  limitr, o) ;
      if holding =-1 then
      kk:=1;
      end   
    
      if TIME >= 145900 and TIME < 150000  then   //收盘前1分钟平仓
      begin
      sell(1, 0, market );
      sellshort(1, 0,  market);
      end

   以上为公式代码,麻烦你们测试一下,另外我没有变动k线图,公式没有未来函数,信号也没有消失,它只是在没有信号的k线上出现无用的开平仓,最关键是图表持仓和模拟账户持仓不同步甚至反向,麻烦你们测试一下。


 回到顶部
总数 19 1 2 下一页