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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 止盈的问题

   

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


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

主题:止盈的问题

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


加好友 发短信
等级:新手上路 帖子:14 积分:91 威望:0 精华:0 注册:2012/5/31 16:51:16
止盈的问题  发帖心情 Post By:2012/6/1 21:59:01    Post IP:113.12.147.242[只看该作者]

variable:hl=0,zs=0,zy=0;
cc:=CALLSTOCK(STKLABEL,VTCLOSE,6);
c5:=CALLSTOCK(STKLABEL,VTCLOSE,2);
jx5:=ma(cc,5);
jx20:=ma(cc,20);
jx5f5:=ma(c5,5);
jx5f20:=ma(c5,20);
sc:=cross(jx5f5,jx5f20);
xc:=cross(jx5f20,jx5f5);

             
if jx5>jx20 then
begin
sellshort(holding<0,0,thisclose);
buy(sc and  holding=0,10,thisclose);
hl:=h;
zs:=enterprice*0.9;
zy:=enterprice*1.1;

end

if jx20>jx5 then
begin
sell(holding>0,0,thisclose);
buyshort(xc and holding=0,10,thisclose);
hl:=l;
zs:=enterprice*1.1;
zy:=enterprice*0.9;

end

if low<=zs then
sell(holding>0,0,market);

if high>=zs then
sellshort(holding<0,0,market);

 

if hl>zy then
sell(holding>0,50%,market);

 

if hl<zy  then
sellshort(holding<0,50%,market);

 

最后2句设定盈利达到10%的时候,平仓一半,但是系统却因满足条件一直不停的平仓,直到没有仓位,哪位高手能帮忙解决此问题啊?


 回到顶部