通達信薛斯撐壓主圖指標公式
- 指標類別: 通達信指標公式
- 授權方式: 免費版
- 指標評級: ★★★★★
- 指標分類: 趨勢
- 畫線方法: 主圖
- 日期:2023-10-10 來源:互聯網
通達信薛斯撐壓主圖指標公式:
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;
DRAWTEXT(絕底,C*0.98,'絕底')COLOR0066FF;
通達信薛斯撐壓主圖指標公式實例圖解:
通達信薛斯撐壓主圖指標公式