{波浪画线} n1:=10;n2:=10;disp:=2; 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,{60f} if(period=3,1,{30f} if(period=2,1,{15f} if(period=1,1{5f},1{1f})))))))))))/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&&tj2&¬(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))&&zd<ref(zd,ref(barslast(tj4),1)); tj8:=tj4&¬(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); stickline(tj8,zsh,zsl,0,-1),colormagenta; stickline(tj8,zsd,zsg,if(disp=1,3,0),1),colormagenta; drawtext(disp=2,zsh,'中枢'),colorwhite; 中枢高:=ployline(disp=2,ref(zsd,barslast(tj8))),circledot,colorlired; 中枢低:=ployline(disp=2,ref(zsg,barslast(tj8))),circledot,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(l,5)<ref(llv(l,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(h,5)>ref(hhv(h,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(l>ref(h,1),1,if(h<ref(l,1),-1,0)); 距前高天:=barslast(局部高点预选c=1); 距前低天:=barslast(局部低点预选c=-1); 小值周期:=lowrange(l); 大值周期:=toprange(h); 低保留aa:=if(局部低点预选c=-1 and ref(距前高天,1)>ref(距前低天,1) and llv(l,距前高天+1)<ref(llv(l,距前高天+1),1),-1,0); 低保留ab:=if(局部低点预选c=-1 and ref(距前高天,1)<=ref(距前低天,1) and (距前高天>=4 or llv(缺口判断,距前高天)=-1 or llv(l,距前低天+2)<ref(llv(l,距前低天+1),1)),-1,0); 低保留s:=if((低保留aa=-1 or 低保留ab=-1) and l<ref(h,距前高天+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(h,距前低天+1)>ref(hhv(h,距前低天+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 h>ref(l,距前低天+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(l,距前高天+1)<ref(llv(l,距前高天+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 l<ref(h,距前高天+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(h,距前低天a+1)>ref(hhv(h,距前低天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 h>ref(l,距前低天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(l,距前高天a+1)<ref(llv(l,距前高天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 l<ref(h,距前高天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(h,距前低天ya+1)>ref(hhv(h,距前低天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 h>ref(l,距前低天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(l,距前高天ya+1)<ref(llv(l,距前高天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 l<ref(h,距前高天ya+1),-1,0); aaad:=if(高保留yx=1 and 低保留yx=-1 and h>ref(h,ref(距前高天ya,1)+2),1,if(高保留yx=1 and 低保留yx=-1 and l<ref(l,ref(距前低天ya,1)+2),-1,0)); 极点保留:=if(aaad=0,高保留yx+低保留yx,aaad);{www.7-0-8-2-2.com} 局部极点:=if(极点保留=-1,l,if(极点保留=1,h,drawnull)) circledot coloryellow; {小折线} drawline(极点保留=-1,局部极点,极点保留=1,局部极点,0)colorlired; drawline(极点保留=1,局部极点,极点保留=-1,局部极点,0)coloryellow; dd1:=barslast(abs(极点保留)!=1); drawtext(极点保留=1,局部极点,'卖'),colorgreen; {stickline(极点保留=1,局部极点,局部极点,30,1),colorcyan;} drawnumber(极点保留=1,局部极点,局部极点)colorcyan; drawtext(极点保留=-1,局部极点,'买'),colorred; {stickline(极点保留=-1,局部极点,局部极点,30,1),colorred;} drawnumber(极点保留=-1,局部极点,局部极点)colorred; ma5:ma(close,5),colorff00ff,linethick2;{www.7-0-8-2-2.com} if(ma5<ref(ma5,1),ma5,drawnull),colorwhite,linethick2; {横虚线} n:=8; aa:=ref(h,n)=hhv(h,2*n+1); aa1:=ref(l,n)=llv(l,2*n+1); qy:=backset(aa,n+1); qy1:=backset(aa1,n+1); cc:=filter(qy,n) and h=hhv(h,n+1); cc1:=filter(qy1,n) and l=llv(l,n+1); ddd:=barslast(cc); dd2:=barslast(cc1); gdts:=if(cc,currbarscount,0); ddts:=if(cc1,currbarscount,0); dingbuts:=if(ddd,ref(gdts,ddd),gdts); ddts1:=if(dd2,ref(ddts,dd2),ddts); gdcs1:=const(dingbuts); ddcs1:=const(ddts1); gdcs13:=const(ref(high,gdcs1-1)); ddcs13:=const(ref(l,ddcs1-1)); dingbuts1:=ref(dingbuts,ddd+1); ddts2:=ref(ddts1,dd2+1); gdcs2:=const(dingbuts1); ddcs2:=const(ddts2);gdcs23:=const(ref(high,dingbuts1-1)); ddcs23:=const(ref(l,ddts2-1)); xg1:=backset(islastbar,gdcs1); xd1:=backset(islastbar,ddcs1); xg2:=backset(islastbar,dingbuts1); xd2:=backset(islastbar,ddts2); stickline(xg2,gdcs23,gdcs23,2,0),colorwhite; stickline(xg1,gdcs13,gdcs13,2,0),coloryellow; stickline(xd2,ddcs23,ddcs23,2,0),colorgray; stickline(xd1,ddcs13,ddcs13,2,0),colorcyan; {大折线} a1:=ref(high,10)=hhv(high,2*10+1); b1:=filter(a1,10); c1:=backset(b1,10+1); d1:=filter(c1,10);{高点} a2:=ref(low,10)=llv(low,2*10+1); b2:=filter(a2,10); c2:=backset(b2,10+1); d2:=filter(c2,10);{低点} e1:=(ref(llv(low,2*10),1)+ref(hhv(high,2*10),1))/2; e2:=(high+low)/2; h1:=(d1 and not((d2 and e1>=e2))) or islastbar or barscount(close)=1; l1:=(d2 and not((d1 and e1<e2))); h2:=d1 and not((d2 and e1>=e2)); x1:=ref(barslast(h1),1)+1; f1:=backset(h1 and count(l1,x1)>0,llvbars(if(l1,low,10000),x1)); g1:=f1>ref(f1,1); i1:=backset(g1,2); ld:=i1>ref(i1,1);{过滤后低点} l2:=ld or islastbar or barscount(close)=1; x2:=ref(barslast(l2),1)+1;{www.7-0-8-2-2.com} f2:=backset(l2 and count(h2,x2)>0,hhvbars(if(h2,high,0),x2)); g2:=f2>ref(f2,1); i2:=backset(g2,2); hd:=i2>ref(i2,1);{过滤后高点} drawline(ld,l,hd,h,0),colormagenta,dotline,linethick1; drawline(hd,h,ld,l,0),colormagenta,dotline,linethick1; j1:=backset(islastbar ,min(barslast(hd),barslast(ld))+1); j2:=j1>ref(j1,1); drawline(j2,if(hd,h,l),islastbar ,if(barslast(hd)>barslast(ld),h,l),0),colorwhite,linethick1; {趋势线} uu:=backset(islastbar,barslast(ld)+1); vv:=uu>ref(uu,1); ww:=backset(vv,ref(barslast(ld),1)+2); xx:=ww>ref(ww,1);{www.7-0-8-2-2.com} drawline(xx,l,vv,l,1),colorred,linethick2; uu2:=backset(islastbar,barslast(hd)+1); vv2:=uu2>ref(uu2,1); ww2:=backset(vv2,ref(barslast(hd),1)+2); xx2:=ww2>ref(ww2,1); drawline(xx2,h,vv2,h,1),colorgreen,linethick2;
上一指标公式:五线镀金 通达信镀金
下一指标公式:卧虎藏龙 通达信卧虎藏龙
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文波浪画线副图 通达信画线源码仅供学习研究。