未来函数检测结果如下:
该公式包含未来函数:ZIG
该公式包含未来函数:PEAK
该公式包含未来函数:PEAKBARS
该公式包含未来函数:TROUGH
该公式包含未来函数:TROUGHBARS
该公式包含未来函数:BACKSET
指标源码:
原理解析:
N赋值:10
P赋值:60
输出趋势:ZIG(3,N)
输出↑:TROUGHBARS(3,N,1),COLOR0000FF,NODRAW
输出↓:PEAKBARS(3,N,1),COLOR00FF00,NODRAW
输出低:IF(↑=0,C,IF(↓<↑,TROUGH(3,N,1),REF(TROUGH(3,N,1),1))),COLOR00FFFF,NODRAW
输出涨%:IF(↑<↓,(C/低-1)*100,REF((C/低-1)*100,↓)),COLOR0000FF,NODRAW
输出高:IF(↓=0,C,IF(↑<↓,PEAK(3,N,1),REF(PEAK(3,N,1),1))),COLOR00FF00,NODRAW
输出跌%:IF(↓<↑,(C/高-1)*100,REF((C/高-1)*100,↑)),COLORFFFF00,NODRAW
输出{以下设置主图显示方式股票指标网 }
上:IF(趋势>1日前的趋势,趋势,DRAWNULL),画红色,LINETHICK2
输出下:IF(趋势<1日前的趋势,趋势,DRAWNULL),COLORGREEN,LINETHICK2
当满足条件↑=0时,在H*1.01和高之间画柱状线
当满足条件↓=0时,在L*0.99和低之间画柱状线
STICKLINE(BETWEEN(↑,0,7),低,低,3,1),COLOR00FFFF
STICKLINE(BETWEEN(↓,0,7),高,高,3,1),COLOR00FF00
当满足条件↑<↓时,在低和低之间画柱状线
当满足条件↓<↑时,在高和高之间画柱状线
{以下设置黄金分割}
KJ:=高-低
输出H1:高-KJ*0.191,COLOR00FFFF,NODRAW
输出H2:高-KJ*0.382,COLOR0000FF,NODRAW
输出H3:高-KJ*0.500,COLORFFFFFF,NODRAW
输出H4:高-KJ*0.618,COLORFF00FF,NODRAW
输出H5:高-KJ*0.809,COLOR00FF00,NODRAW
当满足条件↑<↓ AND ↑>0 AND 趋势<高时,在高和高之间画柱状线
当满足条件↑<↓ AND ↑>0 AND 趋势
当满足条件↓<↑ AND ↓>0 AND 趋势>H2时,在H2和H2之间画柱状线
当满足条件↓<↑ AND ↓>0 AND 趋势>H3时,在H3和H3之间画柱状线
当满足条件↓<↑ AND ↓>0 AND 趋势>H4时,在H4和H4之间画柱状线
当满足条件↓<↑ AND ↓>0 AND 趋势>H5时,在H5和H5之间画柱状线
当满足条件↓<↑ AND ↓>0 AND 趋势>低时,在低和低之间画柱状线
ZHSJ赋值:IF(↓<↑,BACKSET(ISLASTBAR,↓),IF(↑<↓,BACKSET(ISLASTBAR,↑),0))
DRAWTEXT(↓<↑ AND ZHSJ上穿0.1,H1,'险'),COLOR00FFFF
DRAWTEXT(↓<↑ AND ZHSJ上穿0.1,H2,'高'),COLOR00FFFF
DRAWTEXT(↓<↑ AND ZHSJ上穿0.1,H3,'中'),COLOR00FF00
DRAWTEXT(↓<↑ AND ZHSJ上穿0.1,H4,'低'),COLOR00FFFF
DRAWTEXT(↓<↑ AND ZHSJ上穿0.1,H5,'支'),COLOR00FFFF
DRAWTEXT(↓>↑ AND ZHSJ上穿0.1,H1,'压'),COLORFFFFFF
DRAWTEXT(↓>↑ AND ZHSJ上穿0.1,H2,'高'),COLORFFFFFF
DRAWTEXT(↓>↑ AND ZHSJ上穿0.1,H3,'中'),COLOR0000FF
DRAWTEXT(↓>↑ AND ZHSJ上穿0.1,H4,'低'),COLORFFFFFF
DRAWTEXT(↓>↑ AND ZHSJ上穿0.1,H5,'弹'),COLORFFFFFF