通達信精準頂?shù)字鲌D指標公式
- 指標類別: 通達信指標公式
- 授權(quán)方式: 免費版
- 指標評級: ★★★★★
- 指標分類: 停損
- 畫線方法: 主圖
- 日期:2025-01-16 來源:互聯(lián)網(wǎng)
通達信精準頂?shù)字鲌D指標公式:
百分比:=5;右數(shù)峰序:=2;
T1:=CONST(O);
B1:=O=T1;
C1:=O=T1-0.01;
D1:=O=T1+0.01;
E1:=B1=0 AND C1=1;F1:=B1=0 AND D1=1;
B2:=C=T1;
C2:=C=T1-0.01;
D2:=C=T1+0.01;
E2:=B2=0 AND C2=1;F2:=B2=0 AND D2=1;
B3:=L=T1;
C3:=L=T1-0.01;
D3:=L=T1+0.01;
E3:=B3=0 AND C3=1;F3:=B3=0 AND D3=1;
B4:=H=T1;
C4:=H=T1-0.01;
D4:=H=T1+0.01;
E4:=B4=0 AND C4=1;F4:=B4=0 AND D4=1;
Q1:=B1 OR B2 OR B3 OR B4;
Q2:=C1 OR C2 OR C3 OR C4;
Q3:=D1 OR D2 OR D3 OR D4;
開盤嚴格精準:STICKLINE(Q1=1,T1,1.025*T1,1.25,1),COLORYELLOW;
開盤加值精準:STICKLINE(Q2=1 AND Q1=0,T1,1.025*T1,1.25,1),COLORMAGENTA;
開盤減值精準:STICKLINE(Q3=1 AND Q1=0,T1,1.025*T1,1.25,1),COLORGREEN;
開盤精準線:T1,COLORYELLOW;
{低價精準線}
TT1:=CONST(L);
BB1:=O=TT1;
CC1:=O=TT1-0.01;
DD1:=O=TT1+0.01;
EE1:=BB1=0 AND CC1=1;
FF1:=BB1=0 AND DD1=1;
BB2:=C=TT1;
CC2:=C=TT1-0.01;
DD2:=C=TT1+0.01;
EE2:=BB2=0 AND CC2=1;
FF2:=BB2=0 AND DD2=1;
BB3:=L=TT1;
CC3:=L=TT1-0.01;
DD3:=L=TT1+0.01;
EE3:=BB3=0 AND CC3=1;
FF3:=BB3=0 AND DD3=1;
BB4:=H=TT1;
CC4:=H=TT1-0.01;
DD4:=H=TT1+0.01;
EE4:=BB4=0 AND CC4=1;
FF4:=BB4=0 AND DD4=1;
QQ1:=BB1 OR BB2 OR BB3 OR BB4;
QQ2:=CC1 OR CC2 OR CC3 OR CC4;
QQ3:=DD1 OR DD2 OR DD3 OR DD4;
低價嚴格精準:STICKLINE(QQ1=1,TT1,0.975*TT1,1.25,1),COLORYELLOW;
低價加值精準:STICKLINE(QQ2=1 AND QQ1=0,TT1,0.975*TT1,1.25,1),COLORMAGENTA;
低價減值精準:STICKLINE(QQ3=1 AND QQ1=0,TT1,0.975*TT1,1.25,1),COLORGREEN;
低價精準線:TT1, COLORGREEN;
MA6:MA(C,6);
MA18:MA(C,18);{WEN98編寫}
MA24:MA(C,24);
波谷值: CONST(TROUGH(2,百分比,1)),NODRAW;{前M個ZIG轉(zhuǎn)向波谷值}
波谷距離:= 1+CONST(TROUGHBARS(2,百分比,1)),NODRAW;{前M個ZIG轉(zhuǎn)向波谷到當(dāng)前距離}
{例如:TROUGH(2,5,2)表示%5最低價ZIG轉(zhuǎn)向的前2個波谷到當(dāng)前的周期數(shù)};
波峰值:= CONST(PEAK(1,百分比,右數(shù)峰序));
{例如:PEAK(1,5,1)表示%5最高價ZIG轉(zhuǎn)向的上一個波峰的數(shù)值}
XG:= ABS(波峰值-波谷值)<=0.024 {AND BARSCOUNT(V)>60};
波峰距離:= 1+CONST(PEAKBARS(1,百分比,右數(shù)峰序)),NODRAW;
{PEAKBARS(K,N,M)表示之字轉(zhuǎn)向ZIG(K,N)的前M個波峰到當(dāng)前的周期數(shù),M必須大于等于1}
距離:=CURRBARSCOUNT;
DRAWLINE(距離=波峰距離 AND XG,波谷值,距離=1,波谷值,1),COLORMAGENTA;
DRAWTEXT(距離=波谷距離 AND XG,L*0.98,' 峰谷線'),COLORYELLOW;
DRAWICON(距離=波峰距離,H*1.01,2);{波峰位置}
DRAWICON(距離=波谷距離,L*0.985,1);{波谷位置}
精準點:=(ABS(H-波谷值)<=0.024 OR ABS(L-波谷值)<=0.024) {AND 距離<=120};
STICKLINE(精準點,波谷值,波谷值,3,1),COLORYELLOW;
TY:=L;
A1:=REF(TY,10)=HHV(TY,2*10+1); B5:=FILTER(A1,10); C5:=BACKSET(B5,10+1); HD:=FILTER(C5,10);
A2:=REF(TY,10)=LLV(TY,2*10+1); B6:=FILTER(A2,10); C6:=BACKSET(B6,10+1); LD:=FILTER(C6,10);
前期低位:REF(L,BARSLAST(LD)),COLOR00FF00,POINTDOT;
STICKLINE(L,前期低位,前期低位,8,0),COLORRED;
TZ:=H;
A3:=REF(TY,10)=HHV(TY,2*10+1); B7:=FILTER(A1,10); C7:=BACKSET(B5,10+1); MD:=FILTER(C5,10);
A4:=REF(TY,10)=LLV(TY,2*10+1); B8:=FILTER(A2,10); C8:=BACKSET(B6,10+1); ND:=FILTER(C6,10);
前期高位:REF(H,BARSLAST(MD)),COLOR00FF00,POINTDOT;
STICKLINE(H,前期高位,前期高位,8,0),COLORGREEN;
N:=3;
L0:=0.00;{點位差參數(shù)}
L1:=ABS(L-REF(L,1))<=L0;
L2:=ABS(L-REF(L,2))<=L0;
L3:=ABS(L-REF(L,3))<=L0;
L4:=ABS(L-REF(L,4))<=L0;
L5:=ABS(L-REF(L,5))<=L0;
精準線首次:=L1 OR L2 OR L3 OR L4 OR L5;
精準左:=FILTER(精準線首次,N) ;
天數(shù):=BARSLAST(精準左);
LTS:=REF(L,天數(shù));
精準右:=ABS(L-LTS)<=L0;
STICKLINE(精準左,L,L,50,-1),COLOR8080FF;
G1:=ABS(H-REF(H,1))<=L0;
G2:=ABS(H-REF(H,2))<=L0;
G3:=ABS(H-REF(H,3))<=L0;
G4:=ABS(H-REF(H,4))<=L0;
G5:=ABS(H-REF(H,5))<=L0;
G6:=ABS(H-REF(H,6))<=L0;
G7:=ABS(H-REF(H,7))<=L0;
G8:=ABS(H-REF(H,8))<=L0;
精準線1首次:=G1 OR G2 OR G3 OR G4 OR G5 OR G6 OR G7 OR G8;
精準左1:=FILTER(精準線1首次,N) ;
天數(shù)1:=BARSLAST(精準左1);
GTS:=REF(L,天數(shù)1);
精準右1:=ABS(H-LTS)<=L0;
STICKLINE(精準左1,H,H,50,-1),COLOR00FF00;
STICKLINE(C/REF(C,1)>1.095,C,O,2,0),COLORFF1CAE;
通達信精準頂?shù)字鲌D指標公式實例圖解:
通達信精準頂?shù)字鲌D指標公式