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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 请问应该如何理解四句话中的CC?

   

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


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

主题:请问应该如何理解四句话中的CC?

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


加好友 发短信
等级:新手上路 帖子:95 积分:0 威望:0 精华:0 注册:2016/8/18 17:24:28
  发帖心情 Post By:2017/3/14 17:17:58    Post IP:180.136.145.249[显示全部帖子]

holding>0后面为什么接着是cc<=0?

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


加好友 发短信
等级:新手上路 帖子:95 积分:0 威望:0 精华:0 注册:2016/8/18 17:24:28
  发帖心情 Post By:2017/3/14 17:24:43    Post IP:180.136.145.249[显示全部帖子]

 

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

 

如何更简单的理解全局变量的用法?


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


加好友 发短信
等级:新手上路 帖子:95 积分:0 威望:0 精华:0 注册:2016/8/18 17:24:28
  发帖心情 Post By:2017/3/14 17:28:52    Post IP:180.136.145.249[显示全部帖子]

移动止损的编写。

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


加好友 发短信
等级:新手上路 帖子:95 积分:0 威望:0 精华:0 注册:2016/8/18 17:24:28
  发帖心情 Post By:2017/3/14 17:38:34    Post IP:180.136.145.249[显示全部帖子]

http://www.weistock.com/bbs/dispbbs.asp?boardid=10&id=9439&star=1

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


加好友 发短信
等级:新手上路 帖子:95 积分:0 威望:0 精华:0 注册:2016/8/18 17:24:28
  发帖心情 Post By:2017/3/15 9:12:50    Post IP:180.136.145.249[显示全部帖子]

如何更好的去理解全局变量?有没有简单的例子说明?

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


加好友 发短信
等级:新手上路 帖子:95 积分:0 威望:0 精华:0 注册:2016/8/18 17:24:28
  发帖心情 Post By:2017/3/15 9:56:24    Post IP:180.136.145.249[显示全部帖子]

什么样的情况才需要用到全局变量呢?上面的移动止损的编写是否可行?在逐K模式下,触及止损线立即平仓。

 回到顶部