「翔博精选指标」薛斯撑压主图指标
2022-01-12原创 编 辑:翔博软件
N:=5;N1:=30;N2:=3;P1:=15;P2:=3;
A1:=REF(H,N)=HHV(H,2*N+1);
B1:=FILTER(A1,N);
C1:=BACKSET(B1,N+1);
D1:=FILTER(C1,N);
A2:=REF(L,N)=LLV(L,2*N+1);
B2:=FILTER(A2,N);
C2:=BACKSET(B2,N+1);
D2:=FILTER(C2,N);
E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2;
E2:=(H+L)/2;
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR CURRBARSCOUNT=2 OR BARSCOUNT(C)=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,L,10000),X1));
G1:=F1>REF(F1,1);
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);
L2:=LD OR CURRBARSCOUNT=2 OR BARSCOUNT(C)=1;
X2:=REF(BARSLAST(L2),1)+1;
F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS
(IF(H2,H,0),X2));
G2:=F2>REF(F2,1);
I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);
R1:=BACKSET(CURRBARSCOUNT=2,BARSLAST(HD)+1);
S1:=R1>REF(R1,1);
T1:=BACKSET(CURRBARSCOUNT=2,BARSLAST(LD)+1);
U1:=T1>REF(T1,1);
R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);
S2:=R2>REF(R2,1);
T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);
U2:=T2>REF(T2,1);
短期压力:DRAWLINE(S2,H,S1,H,1),COLORRED,LINETHICK2;
短期支撑:DRAWLINE(U2,L,U1,L,1),COLORGREEN,LINETHICK2;
UPPERL: MA(H,N1)*(1+P1/100),COLORWHITE;
UPPERS: MA(H,N2)*(1+P2/100),COLORYELLOW;
LOWERS: MA(L,N2)*(1-P2/100),COLORFF00FF;
LOWERL: MA(L,N1)*(1-P1/100),COLOR00FF00;
AA:=CROSS(MA(C,5),MA(C,10));
AC:=BARSLAST(AA);
上穿值:REF(C,AC),NODRAW;
大底:=CROSS(LOWERL,L) ,NODRAW ;
STICKLINE(大底,C,O,3,0),COLOR0066BB;
STICKLINE(大底,C,O,2,0),COLOR0099CC;
STICKLINE(大底,C,O,1,0),COLOR00CCEE;
STICKLINE(大底,C,O,0.1,0),COLOR00FFFF;
STICKLINE(大底,L,H,0,0),COLOR00FFFF;
DRAWTEXT(大底,C*0.96,'大底')COLOR0000FF;
顶:=REF(HHV(H,90),3),NODRAW;
绝顶:=REFDATE(顶,DATE),NODRAW;
跑:=绝顶=H AND ((C-L)<(O-C) OR (O-L)<(C-O)),NODRAW;
STICKLINE(跑,C,O,3,0),COLOR777777;
STICKLINE(跑,C,O,2,0),COLORAAAAAA;
STICKLINE(跑,C,O,1,0),COLORCCCCCC;
STICKLINE(跑,C,O,0.1,0),COLORFFFFFF;
STICKLINE(跑,L,H,0,0),COLORFFFFFF;
DRAWTEXT(跑,C*1.06,'绝顶')COLORFFFFFF;
绝底:=REF(LLV(L,90),3)=L AND ((C-L)>(O-C) OR (O-L)>(C-O));
STICKLINE(绝底,C,O,3,0),COLOR330033;
STICKLINE(绝底,C,O,2,0),COLOR770077;
STICKLINE(绝底,C,O,1,0),COLORBB00BB;
STICKLINE(绝底,C,O,0.1,0),COLORFF00FF;
STICKLINE(绝底,L,H,0,0),COLORFF00FF;
A1:=REF(H,N)=HHV(H,2*N+1);
B1:=FILTER(A1,N);
C1:=BACKSET(B1,N+1);
D1:=FILTER(C1,N);
A2:=REF(L,N)=LLV(L,2*N+1);
B2:=FILTER(A2,N);
C2:=BACKSET(B2,N+1);
D2:=FILTER(C2,N);
E1:=(REF(LLV(L,2*N),1)+REF(HHV(H,2*N),1))/2;
E2:=(H+L)/2;
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR CURRBARSCOUNT=2 OR BARSCOUNT(C)=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,L,10000),X1));
G1:=F1>REF(F1,1);
I1:=BACKSET(G1,2);
LD:=I1>REF(I1,1);
L2:=LD OR CURRBARSCOUNT=2 OR BARSCOUNT(C)=1;
X2:=REF(BARSLAST(L2),1)+1;
F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS
(IF(H2,H,0),X2));
G2:=F2>REF(F2,1);
I2:=BACKSET(G2,2);
HD:=I2>REF(I2,1);
R1:=BACKSET(CURRBARSCOUNT=2,BARSLAST(HD)+1);
S1:=R1>REF(R1,1);
T1:=BACKSET(CURRBARSCOUNT=2,BARSLAST(LD)+1);
U1:=T1>REF(T1,1);
R2:=BACKSET(S1,REF(BARSLAST(HD),1)+2);
S2:=R2>REF(R2,1);
T2:=BACKSET(U1,REF(BARSLAST(LD),1)+2);
U2:=T2>REF(T2,1);
短期压力:DRAWLINE(S2,H,S1,H,1),COLORRED,LINETHICK2;
短期支撑:DRAWLINE(U2,L,U1,L,1),COLORGREEN,LINETHICK2;
UPPERL: MA(H,N1)*(1+P1/100),COLORWHITE;
UPPERS: MA(H,N2)*(1+P2/100),COLORYELLOW;
LOWERS: MA(L,N2)*(1-P2/100),COLORFF00FF;
LOWERL: MA(L,N1)*(1-P1/100),COLOR00FF00;
AA:=CROSS(MA(C,5),MA(C,10));
AC:=BARSLAST(AA);
上穿值:REF(C,AC),NODRAW;
大底:=CROSS(LOWERL,L) ,NODRAW ;
STICKLINE(大底,C,O,3,0),COLOR0066BB;
STICKLINE(大底,C,O,2,0),COLOR0099CC;
STICKLINE(大底,C,O,1,0),COLOR00CCEE;
STICKLINE(大底,C,O,0.1,0),COLOR00FFFF;
STICKLINE(大底,L,H,0,0),COLOR00FFFF;
DRAWTEXT(大底,C*0.96,'大底')COLOR0000FF;
顶:=REF(HHV(H,90),3),NODRAW;
绝顶:=REFDATE(顶,DATE),NODRAW;
跑:=绝顶=H AND ((C-L)<(O-C) OR (O-L)<(C-O)),NODRAW;
STICKLINE(跑,C,O,3,0),COLOR777777;
STICKLINE(跑,C,O,2,0),COLORAAAAAA;
STICKLINE(跑,C,O,1,0),COLORCCCCCC;
STICKLINE(跑,C,O,0.1,0),COLORFFFFFF;
STICKLINE(跑,L,H,0,0),COLORFFFFFF;
DRAWTEXT(跑,C*1.06,'绝顶')COLORFFFFFF;
绝底:=REF(LLV(L,90),3)=L AND ((C-L)>(O-C) OR (O-L)>(C-O));
STICKLINE(绝底,C,O,3,0),COLOR330033;
STICKLINE(绝底,C,O,2,0),COLOR770077;
STICKLINE(绝底,C,O,1,0),COLORBB00BB;
STICKLINE(绝底,C,O,0.1,0),COLORFF00FF;
STICKLINE(绝底,L,H,0,0),COLORFF00FF;
DRAWTEXT(绝底,C*0.98,'绝底')COLOR0066FF;