通达信支撑压力指标公式
安装后如下图,友情提示(指标只是辅助,不作建议) 所有程序均为免费分享。
不会安装点击 安装指南 步骤操作。
N:=13;DRAWKLINE(H,O,L,C);
AA:=REF(H,N)=HHV(H,2*N+1);
BB:=BACKSET(AA,N+1);
CC:=FILTER(BB,N) AND H=HHV(H,N+1);
DD:=BARSLAST(CC);
EE:=IF(CC,CURRBARSCOUNT,0);
AA1:=REF(L,N)=LLV(L,2*N+1);
BB1:=BACKSET(AA1,N+1);
CC1:=FILTER(BB1,N) AND L=LLV(L,N+1);
DD1:=BARSLAST(CC1);
EE1:=IF(CC1,CURRBARSCOUNT,0);
FF1:=IF(DD1,REF(EE1,DD1),EE1);
GG1:=IF(DD,REF(EE,DD),EE);
SS1:=REF(GG1,DD+1);
SS2:=REF(FF1,DD1+1);
G21:=CONST(GG1);
GS2:=CONST(SS1);
DS2:=CONST(SS2)
{更多指标关注微信公众号:程序化指标};
压:DRAWLINE(CURRBARSCOUNT=GS2,H,CURRBARSCOUNT=G21,H,1),COLORBROWN,LINETHICK1;
撑:DRAWLINE(CURRBARSCOUNT=DS2,L,CURRBARSCOUNT=FF1,L,1),COLORBROWN,LINETHICK1;
M:=INTPART(3*N/5);
AAA:=REF(H,M)=HHV(H,2*M+1);
QYY:=BACKSET(AAA,M+1);
CCC:=FILTER(QYY,M) AND H=HHV(H,M+1);
DDH:=BARSLAST(CCC),NODRAW;
GSS:=IF(CCC,CURRBARSCOUNT,0);
DIS:=IF(DDH,REF(GSS,DDH),GSS);
G11:=CONST(DIS);
DI1:=REF(DIS,DDH+1);
G22:=CONST(DI1);
压M:DRAWLINE(CURRBARSCOUNT=G22,H,CURRBARSCOUNT=G11,H,1),COLORBROWN,LINETHICK1;
A11:=REF(L,M)=LLV(L,2*M+1);
Q11:=BACKSET(A11,M+1);
C11:=FILTER(Q11,M) AND L=LLV(L,M+1);
D11:=BARSLAST(C11);
DSS:=IF(C11,CURRBARSCOUNT,0);
DDT:=IF(D11,REF(DSS,D11),DSS);
D22:=REF(DDT,D11+1);
S22:=CONST(D22);
撑M:DRAWLINE(CURRBARSCOUNT=S22,L,CURRBARSCOUNT=D11,L,1),COLORBROWN,LINETHICK1;
DRAWTEXT(CURRBARSCOUNT=1,撑M,STRCAT(' ',CON2STR(撑M,2))),COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=1,压M,STRCAT(' ',CON2STR(压M,2))),COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=1,压,STRCAT(' ',CON2STR(压,2))),COLORGREEN;
DRAWTEXT(CURRBARSCOUNT=1,撑,STRCAT(' ',CON2STR(撑,2))),COLORGREEN;
N1:=5;
A1:=BACKSET(ISLASTBAR,PEAKBARS(1,N1,1)+1);
A2:=A1>REF(A1,1);
B1:=BACKSET(ISLASTBAR,PEAKBARS(1,N1,2)+1);
B2:=B1>REF(B1,1);
C1:=BACKSET(ISLASTBAR,PEAKBARS(1,N1,3)+1);
C2:=C1>REF(C1,1);
AS1:=BACKSET(ISLASTBAR,TROUGHBARS(2,N1,1)+1);
A21:=AS1>REF(AS1,1);
B11:=BACKSET(ISLASTBAR,TROUGHBARS(2,N1,2)+1);
B21:=B11>REF(B11,1);
CS1:=BACKSET(ISLASTBAR,TROUGHBARS(2,N1,3)+1);
C21:=CS1>REF(CS1,1);
①:DRAWLINE(B2,H,A2,H,1),COLORGRAY;
②:DRAWLINE(C2,H,B2,H,1),COLORGRAY;
③:IF(A1,PEAK(1,N1,1),DRAWNULL),COLORGRAY;
④:DRAWLINE(C2,H,A2,H,1),COLORGRAY;
⑤:DRAWLINE(B21,L,A21,L,1),COLORGRAY;
⑥:DRAWLINE(C21,L,B21,L,1),COLORGRAY;
⑦:DRAWLINE(C21,L,A21,L,1),COLORGRAY;
⑧:IF(A11,TROUGH(2,N1,1),DRAWNULL),COLORGRAY;
DRAWTEXT(CURRBARSCOUNT=1,①,STRCAT(' ',CON2STR(①,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=1,②,STRCAT(' ',CON2STR(②,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=1,③,STRCAT(' ',CON2STR(③,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=1,④,STRCAT(' ',CON2STR(④,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=1,⑤,STRCAT(' ',CON2STR(⑤,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=1,⑥,STRCAT(' ',CON2STR(⑥,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=1,⑦,STRCAT(' ',CON2STR(⑦,2))),COLORYELLOW;
DRAWTEXT(CURRBARSCOUNT=1,⑧,STRCAT(' ',CON2STR(⑧,2))),COLORYELLOW;
版权声明
所有指标均为免费分享。
文章内容来自互联网,本网站无任何收费项目也不推荐股票广告投放请自行识别风险。