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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 怎样能显示全局变量值的变化曲线

   

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


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

主题:怎样能显示全局变量值的变化曲线

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


加好友 发短信
等级:论坛游侠 帖子:193 积分:0 威望:0 精华:0 注册:2018/12/18 15:40:26
怎样能显示全局变量值的变化曲线  发帖心情 Post By:2019/1/10 14:43:21    Post IP:123.168.88.72[显示全部帖子]

代码如下,比如zs在一段时期肯定是有值的,如果一般变量去掉冒号后边的等号就能在图中显示这个值的变化曲线。
但是全局变量貌似没法这样。请问我应该怎么设置才能让全局变量在走势图中显示变化曲线?

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


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


加好友 发短信
等级:论坛游侠 帖子:193 积分:0 威望:0 精华:0 注册:2018/12/18 15:40:26
  发帖心情 Post By:2019/1/10 15:27:04    Post IP:123.168.88.72[显示全部帖子]

感谢版主,搞定啦,原来如此简单啊图片点击可在新窗口打开查看

 回到顶部