中枢缠绵
{n1:1,100,10;n2:1,100,10;disp:=1,3,2};
ma5:ema(c,5),pointdot;
ma10:ma(c,10),coloryellow,linethick2,pointdot;
黄金线:(ema(c,18)),coloryellow;
黄金线1:(ema(c,15)),color0000ff;
ma60:ma(c,60),colorred,pointdot;
ma90:ma(close,90),colord89837,pointdot;
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,'中枢'),colorred;
中枢高: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;
局部低点预选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);
局部极点: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;
drawtext(极点保留=-1,局部极点,'*'),colorred;
倍量:=vol>=ref(v,1)*1.91 and c>o;
缩量:=ref(v,1)>=vol*1.91 and c<o;
stickline(倍量,open,close,2,0),colorred;
stickline(缩量,open,close,2,0),colorgreen;
c2:=ref(c,1);
涨停:=if((c-c2)*100/c2>=(10-0.01*100/c2),1,0);
跌停:=if((c2-c)*100/c2>=(10-0.01*100/c2),1,0);
stickline(涨停,open,close,2,0),coloryellow;
stickline(跌停,open,close,2,0),colorgreen;
高:=refdate(hhv(h,180),date);
低:=refdate(llv(l,180),date);
h1:=高-(高-低)*0.191;
h2:=高-(高-低)*0.382,colorff6198;
h3:=高-(高-低)*0.5,colorffffff;
h4:=高-(高-低)*0.618;
h5:=高-(高-低)*0.809;
stickline(currbarscount=13,高,高,100,-1),colorgreen;
stickline(currbarscount=13,h1,h1,100,-1),colorcyan;
stickline(currbarscount=13,h2,h2,100,-1),colorcccccc;
drawtext(currbarscount=1,高,' 高'),colorgreen;
drawtext(currbarscount=1,h1,' 809'),colorcyan;
drawtext(currbarscount=1,h2,' 618'),colorffffff;
drawtext(currbarscount=1,h3,' 中'),coloryellow;
drawtext(currbarscount=1,h4,' 382'),colorlired;
drawtext(currbarscount=1,h5,' 191'),colormagenta;
drawtext(currbarscount=1,低,' 低'),colorred;
stickline(currbarscount=13,h3,h3,100,-1),coloryellow;
stickline(currbarscount=13,h4,h4,100,-1),colorlired;
stickline(currbarscount=13,h5,h5,100,-1),colormagenta;
stickline(currbarscount=13,低,低,100,-1),colorred;
距今:barssince(c)+1,nodraw;
zz:=距今<100;
条件:=testskip(zz=0);
首日中枢:(ref(h,距今-1)+ref(l,距今-1))/2,nodraw;首日中枢支撑:(首日中枢/1.5) ,colorffaaff;
上一指标公式:神线主图涨停跌停指标下载 通达信涨停神线主图
下一指标公式:多彩副图吸筹放量拉升指标下载 通达信多彩指标
☉ 好公式网发布的指标公式主要用于软件技术面分析,仅供参考,勿用于实际操作,据此操作风险自负!
☉ 解压密码:www.goodgongshi.com 就是好公式网域名,希望大家看清楚,切勿输错。
☉ tnc和tni格式指标公式,仅可以用通达信软件引入使用,例如可以用通达信软件引入使用指标公式;
☉ tne格式指标公式,仅可以用通达信软件公式编辑器5.0版导入,高版本兼容低版本;
☉ fnc格式指标公式,可以用大智慧软件新一代高速行情分析系统股票软件使用,少部分可以用分析家软件引入使用;
☉ alg格式指标公式,仅仅可以用飞狐交易师软件引入使用;exp格式指标公式,仅可以用大智慧经典版软件引入使用;
☉ hxf格式指标公式,仅可以用同花顺软件引入使用。
☉ 如果您发现下载软件链接错误,请联系管理员报告错误。
☉ 好公式网欢迎各位网友帮忙宣传转发本站网址,有您的支持,我们会做得更好!
☉ 本文中枢缠绵主图指标下载 通达信缠绵源码仅供学习研究。