k:=if(period=5,1,if(period=6,1,if(period=7,1,if(period=8,1,if(period=9,1,if(period=10,1,if(period=11,2,if(period=4,1,if(period=3,1,if(period=2,1,if(period=1,1,1)))))))))))/10;
p1:=peak(1,k*n1,1);
p2:=peak(1,k*n1,2);
wp1:=peakbars(1,k*n1,1);
wp2:=peakbars(1,k*n1,2);
t1:=trough(2,k*n2,1);
t2:=trough(2,k*n2,2);
wt1:=troughbars(2,k*n2,1);
wt2:=troughbars(2,k*n2,2);
tj1:=p1>t1 and p2>t2;
zd:=max(t1,t2);
zg:=min(p1,p2);
ll:=min(t1,t2);
hh:=max(p1,p2);
tj2:=filter(zg>zd,2);
tj3:=zg=ref(zg,barslast(tj2)) or zd=ref(zd,barslast(tj2));
tj4:=tj1 and tj2 and not(tj3);
tj5:=between(zd,ref(zd,ref(barslast(tj4),1)),ref(zg,ref(barslast(tj4),1)));
tj6:=between(zg,ref(zd,ref(barslast(tj4),1)),ref(zg,ref(barslast(tj4),1)));
tj7:=zg>ref(zg,ref(barslast(tj4),1)) and zd<ref(zd,ref(barslast(tj4),1));
tj8:=tj4 and not(tj5 or tj6 or tj7);
zsd:=if(tj8,zd,drawnull);
zsg:=if(tj8,zg,drawnull);
zsh:=if(tj8,hh,drawnull);
zsl:=if(tj8,ll,drawnull);
tdxstep128:stickline(tj8,zsh,zsl,0,(-1)),colormagenta;
tdxstep129:stickline(tj8,zsd,zsg,if(disp=1,3,0),1),colormagenta;
中枢高:ployline(disp=2,ref(zsd,barslast(tj8))),crossdot,colorlired;
中枢低:ployline(disp=2,ref(zsg,barslast(tj8))),crossdot,colorligreen;
中枢最高:ployline(disp=2,ref(zsh,barslast(tj8))),pointdot,colorred;
中枢最低:ployline(disp=2,ref(zsl,barslast(tj8))),pointdot,colorgreen;
趋势高:ployline(disp=3,zig(1,k*n1)),colorliblue;
趋势低:ployline(disp=3,zig(2,k*n2)),colorliblue;
局部低点预选a:=backset(llv(qhjsj,5)<ref(llv(qhjsj,4),1),4);
局部低点预选b:=backset(局部低点预选a=0 and ref(局部低点预选a,1)=1,2);
局部低点预选c:=if(局部低点预选b=1 and ref(局部低点预选b,1)=0,(-1),0);
局部高点预选a:=backset(hhv(volinstk,5)>ref(hhv(volinstk,4),1),4);
局部高点预选b:=backset(局部高点预选a=0 and ref(局部高点预选a,1)=1,2);
局部高点预选c:=if(局部高点预选b=1 and ref(局部高点预选b,1)=0,1,0);
缺口判断:=if(qhjsj>ref(volinstk,1),1,if(volinstk<ref(qhjsj,1),(-1),0));
距前高天:=barslast(局部高点预选c=1);
距前低天:=barslast(局部低点预选c=(-1));
小值周期:=lowrange(qhjsj);
大值周期:=toprange(volinstk);
低保留aa:=if(局部低点预选c=(-1) and ref(距前高天,1)>ref(距前低天,1) and llv(qhjsj,距前高天+1)<ref(llv(qhjsj,距前高天+1),1),(-1),0);
低保留ab:=if(局部低点预选c=(-1) and ref(距前高天,1)<=ref(距前低天,1) and (距前高天>=4 or llv(缺口判断,距前高天)=(-1) or llv(qhjsj,距前低天+2)<ref(llv(qhjsj,距前低天+1),1)),(-1),0);
低保留s:=if(低保留aa=(-1) or 低保留ab=(-1) and qhjsj<ref(volinstk,距前高天+1),(-1),0);
预判:=if(距前低天<4 and hhv(缺口判断,距前低天)!=1 or ref(低保留s,距前低天)=0,1,0);
判断:=if(局部高点预选c=1 and ref(距前低天,1)<=ref(距前高天,1) and 预判=1 and 大值周期>ref(小值周期,距前低天+1) and 大值周期>ref(小值周期,距前低天) and 大值周期>ref(大值周期,距前高天),1,0);
高保留a:=if(局部高点预选c=1 and ref(距前低天,1)>ref(距前高天,1) and hhv(volinstk,距前低天+1)>ref(hhv(volinstk,距前低天+1),1),1,0);
高保留b:=if(局部高点预选c=1 and ref(距前低天,1)<=ref(距前高天,1) and ref(低保留s,距前低天)=(-1) and (距前低天>=4 or hhv(缺口判断,距前低天)=1),1,0);
高保留:=if(高保留a=1 or 高保留b=1 or 判断=1 and volinstk>ref(qhjsj,距前低天+1),1,0);
预判a:=if(距前高天<4 and hhv(缺口判断,距前高天)!=1 or ref(高保留,距前高天)=0,1,0);
判断a:=if(局部低点预选c=(-1) and ref(距前高天,1)<=ref(距前低天,1) and 预判a=1 and 小值周期>ref(大值周期,距前高天+1) and 小值周期>ref(大值周期,距前高天) and 小值周期>ref(小值周期,距前低天),(-1),0);
低保留a:=if(局部低点预选c=(-1) and ref(距前高天,1)>ref(距前低天,1) and llv(qhjsj,距前高天+1)<ref(llv(qhjsj,距前高天+1),1),(-1),0);
低保留b:=if(局部低点预选c=(-1) and ref(距前高天,1)<=ref(距前低天,1) and (距前高天>=4 or llv(缺口判断,距前高天)=(-1) or 判断a=(-1)),(-1),0);
低保留:=if(低保留a=(-1) or 低保留b=(-1) and qhjsj<ref(volinstk,距前高天+1),(-1),0);
距前高天a:=barslast(高保留=1);
距前低天a:=barslast(低保留=(-1));
预判x:=if(距前低天a<4 and hhv(缺口判断,距前低天a)!=1 or ref(低保留,距前低天a)=0,1,0);
判断x:=if(局部高点预选c=1 and ref(距前低天a,1)<=ref(距前高天a,1) and 预判x=1 and 大值周期>ref(小值周期,距前低天a+1) and 大值周期>ref(小值周期,距前低天a) and 大值周期>ref(大值周期,距前高天a),1,0);
高保留xa:=if(局部高点预选c=1 and ref(距前低天a,1)>ref(距前高天a,1) and hhv(volinstk,距前低天a+1)>ref(hhv(volinstk,距前低天a+1),1),1,0);
高保留xb:=if(局部高点预选c=1 and ref(距前低天a,1)<=ref(距前高天a,1) and ref(低保留,距前低天a)=(-1) and (距前低天a>=4 or hhv(缺口判断,距前低天a)=1),1,0);
高保留x:=if(高保留xa=1 or 高保留xb=1 or 判断x=1 and volinstk>ref(qhjsj,距前低天a+1),1,0);
预判xa:=if(距前高天a<4 and hhv(缺口判断,距前高天a)!=1 or ref(高保留xa,距前高天a)=0,1,0);
判断xa:=if(局部低点预选c=(-1) and ref(距前高天a,1)<=ref(距前低天a,1) and 预判xa=1 and 小值周期>ref(大值周期,距前高天a+1) and 小值周期>ref(大值周期,距前高天a) and 小值周期>ref(小值周期,距前低天a),(-1),0);
低保留xa:=if(局部低点预选c=(-1) and ref(距前高天a,1)>ref(距前低天a,1) and llv(qhjsj,距前高天a+1)<ref(llv(qhjsj,距前高天a+1),1),(-1),0);
低保留xb:=if(局部低点预选c=(-1) and ref(距前高天a,1)<=ref(距前低天a,1) and (距前高天a>=4 or llv(缺口判断,距前高天a)=(-1) or 判断xa=(-1)),(-1),0);
低保留x:=if(低保留xa=(-1) or 低保留xb=(-1) and qhjsj<ref(volinstk,距前高天a+1),(-1),0);
距前高天ya:=barslast(高保留x=1);
距前低天ya:=barslast(低保留x=(-1));
预判yx:=if(距前低天ya<4 and hhv(缺口判断,距前低天ya)!=1 or ref(低保留x,距前低天ya)=0,1,0);
判断yx:=if(局部高点预选c=1 and ref(距前低天ya,1)<=ref(距前高天ya,1) and 预判yx=1 and 大值周期>ref(小值周期,距前低天ya+1) and 大值周期>ref(小值周期,距前低天ya) and 大值周期>ref(大值周期,距前高天ya),1,0);
高保留yxa:=if(局部高点预选c=1 and ref(距前低天ya,1)>ref(距前高天ya,1) and hhv(volinstk,距前低天ya+1)>ref(hhv(volinstk,距前低天ya+1),1),1,0);
高保留yxb:=if(局部高点预选c=1 and ref(距前低天ya,1)<=ref(距前高天ya,1) and ref(低保留x,距前低天ya)=(-1) and (距前低天ya>=4 or hhv(缺口判断,距前低天ya)=1),1,0);
高保留yx:=if(高保留yxa=1 or 高保留yxb=1 or 判断yx=1 and volinstk>ref(qhjsj,距前低天ya+1),1,0);
预判yxa:=if(距前高天ya<4 and hhv(缺口判断,距前高天ya)!=1 or ref(高保留yxa,距前高天ya)=0,1,0);
判断yxa:=if(局部低点预选c=(-1) and ref(距前高天ya,1)<=ref(距前低天ya,1) and 预判yxa=1 and 小值周期>ref(大值周期,距前高天ya+1) and 小值周期>ref(大值周期,距前高天ya) and 小值周期>ref(小值周期,距前低天ya),(-1),0);
低保留yxa:=if(局部低点预选c=(-1) and ref(距前高天ya,1)>ref(距前低天ya,1) and llv(qhjsj,距前高天ya+1)<ref(llv(qhjsj,距前高天ya+1),1),(-1),0);
低保留yxb:=if(局部低点预选c=(-1) and ref(距前高天ya,1)<=ref(距前低天ya,1) and (距前高天ya>=4 or llv(缺口判断,距前高天ya)=(-1) or 判断yxa=(-1)),(-1),0);
低保留yx:=if(低保留yxa=(-1) or 低保留yxb=(-1) and qhjsj<ref(volinstk,距前高天ya+1),(-1),0);
aaad:=if(高保留yx=1 and 低保留yx=(-1) and volinstk>ref(volinstk,ref(距前高天ya,1)+2),1,if(高保留yx=1 and 低保留yx=(-1) and qhjsj<ref(qhjsj,ref(距前低天ya,1)+2),(-1),0));
极点保留:=if(aaad=0,高保留yx+低保留yx,aaad);
局部极点:if(极点保留=(-1),qhjsj,if(极点保留=1,volinstk,drawnull)),circledot,coloryellow;
tdxstep130:drawline(极点保留=(-1),局部极点,极点保留=1,局部极点,0),colorlired;
tdxstep131:drawline(极点保留=1,局部极点,极点保留=(-1),局部极点,0),coloryellow;
tdxstep132:stickline(极点保留=(-1),min(open,advance),max(open,advance),4,0),colorred;
tdxstep133:stickline(极点保留=1,min(open,advance),max(open,advance),4,0),colorgreen;
dd1:=barslast(abs(极点保留)!=1);
ma5:ma(close,5),colormagenta,linethick2;
判:if(ma5<ref(ma5,1),ma5,drawnull),colorwhite,linethick2;
若上述公式在汇盈系列行情数据分析软件中有异常,请尝试如下公式:
k:=if(period=5,1,if(period=6,1,if(period=7,1,if(period=8,1,if(period=9,1,if(period=10,1,if(period=11,2,if(period=4,1,if(period=3,1,if(period=2,1,if(period=1,1,1)))))))))))/10;
p1:=peak(1,k*n1,1);
p2:=peak(1,k*n1,2);
wp1:=peakbars(1,k*n1,1);
wp2:=peakbars(1,k*n1,2);
t1:=trough(2,k*n2,1);
t2:=trough(2,k*n2,2);
wt1:=troughbars(2,k*n2,1);
wt2:=troughbars(2,k*n2,2);
tj1:=p1>t1 and p2>t2;
zd:=max(t1,t2);
zg:=min(p1,p2);
ll:=min(t1,t2);
hh:=max(p1,p2);
tj2:=filter(zg>zd,2);
tj3:=zg=ref(zg,barslast(tj2)) or zd=ref(zd,barslast(tj2));
tj4:=tj1 and tj2 and not(tj3);
tj5:=between(zd,ref(zd,ref(barslast(tj4),1)),ref(zg,ref(barslast(tj4),1)));
tj6:=between(zg,ref(zd,ref(barslast(tj4),1)),ref(zg,ref(barslast(tj4),1)));
tj7:=zg>ref(zg,ref(barslast(tj4),1)) and zd<ref(zd,ref(barslast(tj4),1));
tj8:=tj4 and not(tj5 or tj6 or tj7);
zsd:=if(tj8,zd,drawnull);
zsg:=if(tj8,zg,drawnull);
zsh:=if(tj8,hh,drawnull);
zsl:=if(tj8,ll,drawnull);
tdxstep128:stickline(tj8,zsh,zsl,0,(-1)),colormagenta;
tdxstep129:stickline(tj8,zsd,zsg,if(disp=1,3,0),1),colormagenta;
中枢高:ployline(disp=2,ref(zsd,barslast(tj8))),crossdot,colorlired;
中枢低:ployline(disp=2,ref(zsg,barslast(tj8))),crossdot,colorligreen;
中枢最高:ployline(disp=2,ref(zsh,barslast(tj8))),pointdot,colorred;
中枢最低:ployline(disp=2,ref(zsl,barslast(tj8))),pointdot,colorgreen;
趋势高:ployline(disp=3,zig(1,k*n1)),colorliblue;
趋势低:ployline(disp=3,zig(2,k*n2)),colorliblue;
局部低点预选a:=backset(llv(low,5)<ref(llv(low,4),1),4);
局部低点预选b:=backset(局部低点预选a=0 and ref(局部低点预选a,1)=1,2);
局部低点预选c:=if(局部低点预选b=1 and ref(局部低点预选b,1)=0,(-1),0);
局部高点预选a:=backset(hhv(high,5)>ref(hhv(high,4),1),4);
局部高点预选b:=backset(局部高点预选a=0 and ref(局部高点预选a,1)=1,2);
局部高点预选c:=if(局部高点预选b=1 and ref(局部高点预选b,1)=0,1,0);
缺口判断:=if(low>ref(high,1),1,if(high<ref(low,1),(-1),0));
距前高天:=barslast(局部高点预选c=1);
距前低天:=barslast(局部低点预选c=(-1));
小值周期:=lowrange(low);
大值周期:=toprange(high);
低保留aa:=if(局部低点预选c=(-1) and ref(距前高天,1)>ref(距前低天,1) and llv(low,距前高天+1)<ref(llv(low,距前高天+1),1),(-1),0);
低保留ab:=if(局部低点预选c=(-1) and ref(距前高天,1)<=ref(距前低天,1) and (距前高天>=4 or llv(缺口判断,距前高天)=(-1) or llv(low,距前低天+2)<ref(llv(low,距前低天+1),1)),(-1),0);
低保留s:=if(低保留aa=(-1) or 低保留ab=(-1) and low<ref(high,距前高天+1),(-1),0);
预判:=if(距前低天<4 and hhv(缺口判断,距前低天)!=1 or ref(低保留s,距前低天)=0,1,0);
判断:=if(局部高点预选c=1 and ref(距前低天,1)<=ref(距前高天,1) and 预判=1 and 大值周期>ref(小值周期,距前低天+1) and 大值周期>ref(小值周期,距前低天) and 大值周期>ref(大值周期,距前高天),1,0);
高保留a:=if(局部高点预选c=1 and ref(距前低天,1)>ref(距前高天,1) and hhv(high,距前低天+1)>ref(hhv(high,距前低天+1),1),1,0);
高保留b:=if(局部高点预选c=1 and ref(距前低天,1)<=ref(距前高天,1) and ref(低保留s,距前低天)=(-1) and (距前低天>=4 or hhv(缺口判断,距前低天)=1),1,0);
高保留:=if(高保留a=1 or 高保留b=1 or 判断=1 and high>ref(low,距前低天+1),1,0);
预判a:=if(距前高天<4 and hhv(缺口判断,距前高天)!=1 or ref(高保留,距前高天)=0,1,0);
判断a:=if(局部低点预选c=(-1) and ref(距前高天,1)<=ref(距前低天,1) and 预判a=1 and 小值周期>ref(大值周期,距前高天+1) and 小值周期>ref(大值周期,距前高天) and 小值周期>ref(小值周期,距前低天),(-1),0);
低保留a:=if(局部低点预选c=(-1) and ref(距前高天,1)>ref(距前低天,1) and llv(low,距前高天+1)<ref(llv(low,距前高天+1),1),(-1),0);
低保留b:=if(局部低点预选c=(-1) and ref(距前高天,1)<=ref(距前低天,1) and (距前高天>=4 or llv(缺口判断,距前高天)=(-1) or 判断a=(-1)),(-1),0);
低保留:=if(低保留a=(-1) or 低保留b=(-1) and low<ref(high,距前高天+1),(-1),0);
距前高天a:=barslast(高保留=1);
距前低天a:=barslast(低保留=(-1));
预判x:=if(距前低天a<4 and hhv(缺口判断,距前低天a)!=1 or ref(低保留,距前低天a)=0,1,0);
判断x:=if(局部高点预选c=1 and ref(距前低天a,1)<=ref(距前高天a,1) and 预判x=1 and 大值周期>ref(小值周期,距前低天a+1) and 大值周期>ref(小值周期,距前低天a) and 大值周期>ref(大值周期,距前高天a),1,0);
高保留xa:=if(局部高点预选c=1 and ref(距前低天a,1)>ref(距前高天a,1) and hhv(high,距前低天a+1)>ref(hhv(high,距前低天a+1),1),1,0);
高保留xb:=if(局部高点预选c=1 and ref(距前低天a,1)<=ref(距前高天a,1) and ref(低保留,距前低天a)=(-1) and (距前低天a>=4 or hhv(缺口判断,距前低天a)=1),1,0);
高保留x:=if(高保留xa=1 or 高保留xb=1 or 判断x=1 and high>ref(low,距前低天a+1),1,0);
预判xa:=if(距前高天a<4 and hhv(缺口判断,距前高天a)!=1 or ref(高保留xa,距前高天a)=0,1,0);
判断xa:=if(局部低点预选c=(-1) and ref(距前高天a,1)<=ref(距前低天a,1) and 预判xa=1 and 小值周期>ref(大值周期,距前高天a+1) and 小值周期>ref(大值周期,距前高天a) and 小值周期>ref(小值周期,距前低天a),(-1),0);
低保留xa:=if(局部低点预选c=(-1) and ref(距前高天a,1)>ref(距前低天a,1) and llv(low,距前高天a+1)<ref(llv(low,距前高天a+1),1),(-1),0);
低保留xb:=if(局部低点预选c=(-1) and ref(距前高天a,1)<=ref(距前低天a,1) and (距前高天a>=4 or llv(缺口判断,距前高天a)=(-1) or 判断xa=(-1)),(-1),0);
低保留x:=if(低保留xa=(-1) or 低保留xb=(-1) and low<ref(high,距前高天a+1),(-1),0);
距前高天ya:=barslast(高保留x=1);
距前低天ya:=barslast(低保留x=(-1));
预判yx:=if(距前低天ya<4 and hhv(缺口判断,距前低天ya)!=1 or ref(低保留x,距前低天ya)=0,1,0);
判断yx:=if(局部高点预选c=1 and ref(距前低天ya,1)<=ref(距前高天ya,1) and 预判yx=1 and 大值周期>ref(小值周期,距前低天ya+1) and 大值周期>ref(小值周期,距前低天ya) and 大值周期>ref(大值周期,距前高天ya),1,0);
高保留yxa:=if(局部高点预选c=1 and ref(距前低天ya,1)>ref(距前高天ya,1) and hhv(high,距前低天ya+1)>ref(hhv(high,距前低天ya+1),1),1,0);
高保留yxb:=if(局部高点预选c=1 and ref(距前低天ya,1)<=ref(距前高天ya,1) and ref(低保留x,距前低天ya)=(-1) and (距前低天ya>=4 or hhv(缺口判断,距前低天ya)=1),1,0);
高保留yx:=if(高保留yxa=1 or 高保留yxb=1 or 判断yx=1 and high>ref(low,距前低天ya+1),1,0);
预判yxa:=if(距前高天ya<4 and hhv(缺口判断,距前高天ya)!=1 or ref(高保留yxa,距前高天ya)=0,1,0);
判断yxa:=if(局部低点预选c=(-1) and ref(距前高天ya,1)<=ref(距前低天ya,1) and 预判yxa=1 and 小值周期>ref(大值周期,距前高天ya+1) and 小值周期>ref(大值周期,距前高天ya) and 小值周期>ref(小值周期,距前低天ya),(-1),0);
低保留yxa:=if(局部低点预选c=(-1) and ref(距前高天ya,1)>ref(距前低天ya,1) and llv(low,距前高天ya+1)<ref(llv(low,距前高天ya+1),1),(-1),0);
低保留yxb:=if(局部低点预选c=(-1) and ref(距前高天ya,1)<=ref(距前低天ya,1) and (距前高天ya>=4 or llv(缺口判断,距前高天ya)=(-1) or 判断yxa=(-1)),(-1),0);
低保留yx:=if(低保留yxa=(-1) or 低保留yxb=(-1) and low<ref(high,距前高天ya+1),(-1),0);
aaad:=if(高保留yx=1 and 低保留yx=(-1) and high>ref(high,ref(距前高天ya,1)+2),1,if(高保留yx=1 and 低保留yx=(-1) and low<ref(low,ref(距前低天ya,1)+2),(-1),0));
极点保留:=if(aaad=0,高保留yx+低保留yx,aaad);
局部极点:if(极点保留=(-1),low,if(极点保留=1,high,drawnull)),circledot,coloryellow;
tdxstep130:drawline(极点保留=(-1),局部极点,极点保留=1,局部极点,0),colorlired;
tdxstep131:drawline(极点保留=1,局部极点,极点保留=(-1),局部极点,0),coloryellow;
tdxstep132:stickline(极点保留=(-1),min(open,close),max(open,close),4,0),colorred;
tdxstep133:stickline(极点保留=1,min(open,close),max(open,close),4,0),colorgreen;
dd1:=barslast(abs(极点保留)!=1);
ma5:ma(close,5),colormagenta,linethick2;
判:if(ma5<ref(ma5,1),ma5,drawnull),colorwhite,linethick2;
{-----------------------------------}
上一指标公式:顶底判断公式下载 通达信判断
下一指标公式:谭氏富五代公式下载 通达信谭氏富
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文纵横四海公式下载 通达信纵横四海仅供学习研究。