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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → [求助]请教下这样可以实现吗?

   

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


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

主题:[求助]请教下这样可以实现吗?

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


加好友 发短信 原leevolvo
等级:版主 帖子:2160 积分:10563 威望:0 精华:11 注册:2010/11/3 11:21:19
  发帖心情 Post By:2011/11/17 12:22:28    Post IP:120.42.45.130[显示全部帖子]

在强大的金字塔面前,It is so easy !

variable:cc=0;

ma5:=ma(c,5);

ma10:=ma(c,10);

if cc>0 and ma5<ma10 then begin

  sell(1,1,thisclose);

  cc:=0;

end

if cc<0 and ma5>ma10 then begin

  sellshort(1,1,thisclose);

  cc:=0;

end

if cc=0 and ma5>ma10 then begin

  cc:=1;

  kpos:=barpos;

  buy((c-o/o<0.001),1,thisclose);

end

if cc=0 and ma5<ma10 then begin

  cc:=-1;

  kpos:=barpos;

  buyshort((c-o)/o>-0.001,1,thisclose);

end

if holding=0 and cc=1 and barpos-kpos>=1 then buy(1,1,thisclose);//出信号时不符合开仓条件,则推迟1根K线开仓

if holding=0 and cc=-1 and barpos-kpos>=1 then buyshort(1,1,thisclose);


 回到顶部