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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → [讨论]谁能解释下这开平仓带止损的模型

   

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


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

主题:[讨论]谁能解释下这开平仓带止损的模型

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


加好友 发短信
等级:论坛游侠 帖子:108 积分:0 威望:0 精华:0 注册:2013/6/4 22:53:27
[讨论]谁能解释下这开平仓带止损的模型  发帖心情 Post By:2015/1/4 11:34:02    Post IP:115.55.172.190[只看该作者]

谁能解释下这开平仓带止损的模型  看不懂怎么开仓的 想套用他的移动止损 我现在的模型有 kd kk  pd pk  怎么套用移动止损呢 

runmode:0;

variable:zs=0,cc=0,hl=0;

ma5:=ma(c,5);

ma20:=ma(c,20);

entertime:=time>100000 and time<144500;

if holding>0 and cc<=0 then sell(1,1,limitr,o);

if holding<0 and cc>=0 then sellshort(1,1,limitr,o);

if holding=0 and cc>0 then buy(1,1,limitr,o);

if holding=0 and cc<0 then buyshort(1,1,limitr,o);

if cc>0 and l<zs then begin

 sell(1,1,limitr,min(o,zs-0.6));

 cc:=0;

end

if cc<0 and h>zs then begin

 sellshort(1,1,limitr,max(o,zs+0.6));

 cc:=0;

end

if cc>0 and ma5<ma20 then cc:=0;

if cc<0 and ma5>ma20 then cc:=0;

if cc=0 and ma5>ma20 and entertime then begin

 cc:=1;

 zs:=c-10;

 hl:=h;

end

if cc=0 and ma5<ma20 and entertime then begin

 cc:=-1;

 zs:=c+10;

 hl:=l;

end

if cc>0 and h>hl then begin//创新高后,上移hl

 hl:=h;

 zs:=hl-10;

end

if cc<0 and l<hl then begin//创新低后,下移hl

 hl:=l;

 zs:=hl+10;

end

if time>=150000 then begin

 cc:=0;

end



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