通達(dá)信看長(zhǎng)做短KDJ指標(biāo)公式
- 指標(biāo)類別: 通達(dá)信指標(biāo)公式
- 授權(quán)方式: 免費(fèi)版
- 指標(biāo)評(píng)級(jí): ★★★★★
- 指標(biāo)分類: 超買超賣
- 畫(huà)線方法: 副圖
- 日期:2019-01-09 來(lái)源:互聯(lián)網(wǎng)
通達(dá)信看長(zhǎng)做短KDJ指標(biāo)公式:
STICKLINE(C,50,20,10,0),COLOR996600;
STICKLINE(C,80,50,10,0),COLOR996600;
STICKLINE(C,100,100,10,0),COLOR996600;
STICKLINE(C,0,0,10,0),COLOR996600;
STICKLINE(C,50,50,10,0),COLOR000000;
{KM組合}{根據(jù)股價(jià)調(diào)整N,默認(rèn)1000}
系數(shù):=1000/1000;
B1:=(HHV(H,9)-C)/(HHV(H,9)-LLV(LOW,9))*100- 70;
B2:=SMA(B1,9,1)+100;
B3:=(C-LLV(L,9))/(HHV(H,9)- LLV(L,9))*100;
B4:=SMA(B3,3,1);
B5:=SMA(B4,3,1)+100;
B6:=B5-B2;
B7:=IF(B6>60,B6-60,0);
DIFF:EMA(CLOSE,12) - EMA(CLOSE,26),COLORBLUE,LINETHICK2,NODRAW;
DEA1:=EMA(DIFF,9);
MACD:2*(DIFF-DEA1)*60,LINETHICK0,NODRAW;
S1:=MACD<REF(MACD,1)AND MACD>0,COLORBLUE;
S2:=MACD<REF(MACD,1) AND MACD<0;
STICKLINE(MACD>=0,MACD*系數(shù),0,8,1),COLORRED;
STICKLINE(S1,0,MACD*系數(shù),8,1),COLOR00FFFF;
STICKLINE(MACD<0,MACD*系數(shù),0,8,1),COLOR996600;
STICKLINE(S2,0,MACD*系數(shù),8,1),COLOR00AA00;
{長(zhǎng)KDJ}
長(zhǎng)RSV:=(((CLOSE - LLV(LOW,90)) / (HHV(HIGH,90) - LLV(LOW,90))) * 100);
長(zhǎng)K:=SMA(長(zhǎng)RSV,12,1),COLORWHITE,POINTDOT,LINETHICK4;
長(zhǎng)D:SMA(長(zhǎng)K,12,1),COLORYELLOW,POINTDOT,LINETHICK4,NODRAW;
長(zhǎng)J:((3 * 長(zhǎng)K) - (2 *長(zhǎng)D)),COLORRED,POINTDOT,LINETHICK4;
STICKLINE(CROSS(長(zhǎng)D,80),108,115,4,0),COLOR33FF33;
STICKLINE(CROSS(長(zhǎng)D,15),0,10,4,0),COLOR3333AA;
{KDJ}
RSV:=(((CLOSE - LLV(LOW,9)) / (HHV(HIGH,9) - LLV(LOW,9))) * 100);
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=((3 * K) - (2 * D));
DRAWICON(FILTER(CROSS(K,D)AND K<50,1),0,1);
STICKLINE(CROSS(90,J),108,115,4,0),COLORGREEN;
DRAWTEXT(CROSS(90,J),105,'拋'),COLORGREEN;
STICKLINE(CROSS(J,(0 - 5)),0,10,4,0),COLORCYAN;
DRAWTEXT(CROSS(J,(0 - 5)),(0 - 4),'吸'),COLORCYAN;
{KDJ背離}
AA2:=BARSLAST(REF(CROSS(K,D),1));
BB2:=REF(C,AA2+1)>C AND REF(K,AA2+1)<K AND CROSS(K,D);
KDJ底背離:STICKLINE(FILTER(BB2>0,5),0,1,3,0),COLORYELLOW;
DRAWTEXT(FILTER(BB2>0,5),-8,'底背離'),COLORYELLOW;
CC2:=BARSLAST(REF(CROSS(D,K),1));
DD2:=REF(C,CC2+1)<C AND REF(K,CC2+1)>K AND CROSS(D,K);
DRAWTEXT(FILTER(DD2>0,5),-8,'頂背離'),COLORGREEN;
{顯示優(yōu)化}
STICKLINE(REF(B7,1)<B7,J,REF(J,1),5,0),COLOR0090FF;
短K:K,COLORWHITE,LINETHICK2;
短D:D,COLORYELLOW,LINETHICK2;
短J:J,COLORMAGENTA,LINETHICK2;
金叉D:IF((K > D),D,DRAWNULL),COLORYELLOW,LINETHICK4;
通達(dá)信看長(zhǎng)做短KDJ指標(biāo)公式實(shí)例圖解:
通達(dá)信看長(zhǎng)做短KDJ指標(biāo)公式