股票论坛

 找回密码
 免费注册
搜索
热搜: 活动 交友 discuz
查看: 1969|回复: 1
打印 上一主题 下一主题

在低点显示最大转折

[复制链接]

刺使

Rank: 6Rank: 6

听众
3
跳转到指定楼层
楼主
发表于 2016-5-25 17:37 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
30爱心果
老师好,自己做了一个zig转折指标,在转折低点显示转折力度,结果发现在较大转折时,小的转折也显示出来了,如图显示,求助老师帮忙改进一下;
当最大转折是”折5“的时候只显示”折5“;
当最大转折是”折30“的时候只显示”折30“,不用显示其他的小转折;

先提前谢谢老师,老师辛苦,提前给您拜年了!

以下是主图源码和天马精化的图片展示。


VAR90:=ZIG(3,90)>REF(ZIG(3,90),1) AND REF(ZIG(3,90),1)<REF(ZIG(3,90),2);
DRAWTEXT(VAR90,L*0.62,'折90'),COLORYELLOW;
VAR80:=ZIG(3,80)>REF(ZIG(3,80),1) AND REF(ZIG(3,80),1)<REF(ZIG(3,80),2);
DRAWTEXT(VAR80,L*0.66,'折80'),COLORYELLOW;
VAR70:=ZIG(3,70)>REF(ZIG(3,70),1) AND REF(ZIG(3,70),1)<REF(ZIG(3,70),2);
DRAWTEXT(VAR70,L*0.70,'折70'),COLORYELLOW;
VAR60:=ZIG(3,60)>REF(ZIG(3,60),1) AND REF(ZIG(3,60),1)<REF(ZIG(3,60),2);
DRAWTEXT(VAR60,L*0.74,'折60'),COLORYELLOW;
VAR50:=ZIG(3,50)>REF(ZIG(3,50),1) AND REF(ZIG(3,50),1)<REF(ZIG(3,50),2);
DRAWTEXT(VAR50,L*0.78,'折50'),COLORYELLOW;
VAR40:=ZIG(3,40)>REF(ZIG(3,40),1) AND REF(ZIG(3,40),1)<REF(ZIG(3,40),2);
DRAWTEXT(VAR40,L*0.82,'折40'),COLORYELLOW;
VAR30:=ZIG(3,30)>REF(ZIG(3,30),1) AND REF(ZIG(3,30),1)<REF(ZIG(3,30),2);
DRAWTEXT(VAR30,L*0.86,'折30'),COLORYELLOW;
VAR20:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<REF(ZIG(3,20),2);
DRAWTEXT(VAR20,L*0.90,'折20'),COLORYELLOW;
VAR10:=REF(ZIG(3,10),1)<ZIG(3,10) AND REF(ZIG(3,10),1)<REF(ZIG(3,10),2);
DRAWTEXT(VAR10,L*0.94,'折10'),COLORYELLOW;
VAR5:=REF(ZIG(3,5),1)<ZIG(3,5) AND REF(ZIG(3,5),1)<REF(ZIG(3,5),2);
DRAWTEXT(VAR5,L*0.98,'折5'),COLORYELLOW;

最佳答案

查看完整内容

VAR90:=ZIG(3,90)>REF(ZIG(3,90),1) AND REF(ZIG(3,90),1)REF(ZIG(3,80),1) AND REF(ZIG(3,80),1)REF(ZIG(3,70),1) AND REF(ZIG(3,70),1)REF(ZIG(3,60),1) AND REF(ZIG(3,60),1)REF(ZIG(3,50),1) AND REF(ZIG(3,50),1)REF(ZIG(3,40),1) AND REF(ZIG(3,40),1)REF(ZIG(3,30),1) AND REF(ZIG(3,30),1)REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)

爵★★★

Rank: 21Rank: 21Rank: 21Rank: 21Rank: 21Rank: 21

听众
5
沙发
发表于 2016-5-25 17:37 | 只看该作者
VAR90:=ZIG(3,90)>REF(ZIG(3,90),1) AND REF(ZIG(3,90),1)<REF(ZIG(3,90),2);
VAR80:=ZIG(3,80)>REF(ZIG(3,80),1) AND REF(ZIG(3,80),1)<REF(ZIG(3,80),2);
VAR70:=ZIG(3,70)>REF(ZIG(3,70),1) AND REF(ZIG(3,70),1)<REF(ZIG(3,70),2);
VAR60:=ZIG(3,60)>REF(ZIG(3,60),1) AND REF(ZIG(3,60),1)<REF(ZIG(3,60),2);
VAR50:=ZIG(3,50)>REF(ZIG(3,50),1) AND REF(ZIG(3,50),1)<REF(ZIG(3,50),2);
VAR40:=ZIG(3,40)>REF(ZIG(3,40),1) AND REF(ZIG(3,40),1)<REF(ZIG(3,40),2);
VAR30:=ZIG(3,30)>REF(ZIG(3,30),1) AND REF(ZIG(3,30),1)<REF(ZIG(3,30),2);
VAR20:=ZIG(3,20)>REF(ZIG(3,20),1) AND REF(ZIG(3,20),1)<REF(ZIG(3,20),2);
VAR10:=REF(ZIG(3,10),1)<ZIG(3,10) AND REF(ZIG(3,10),1)<REF(ZIG(3,10),2);
VAR5:=REF(ZIG(3,5),1)<ZIG(3,5) AND REF(ZIG(3,5),1)<REF(ZIG(3,5),2);
QFZ:=IF(VAR90=1,VAR90,IF(VAR80=1,VAR80,IF(VAR70=1,VAR70,IF(VAR60=1,VAR60,IF(VAR50=1,VAR50,IF(VAR40=1,VAR40,IF(VAR30=1,VAR30,IF(VAR20=1,VAR20,IF(VAR10=1,VAR10,VAR5)))))))));
QFS:=IF(VAR90=1,'折90',IF(VAR80=1,'折80',IF(VAR70=1,'折70',IF(VAR60=1,'折60',IF(VAR50=1,'折50',IF(VAR40=1,'折40',IF(VAR30=1,'折30',IF(VAR20=1,'折20',IF(VAR10=1,'折10','折5')))))))));
DRAWTEXT(QFZ,L*0.98,QFS),COLORYELLOW;
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 免费注册

本版积分规则

QQ|站点首页|手机版|小黑屋|帮助中心|桂ICP备14001964号

GMT+8, 2024-11-24 07:34 , Processed in 0.159469 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表