DIFF:EMA(CLOSE,8) - EMA(CLOSE,24);
DEA:EMA(DIFF,6);
macd:2*(DIFF-DEA),COLORSTICK,colorbrown;
A1:=BArslAST(REF(crOSS(DIFF,DEA),1));
B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;
LC:=REF(CLOSE,1);
rsi1:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(Abs(CLOSE-LC),6,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;
A2:=BARSLAST(REF(CROSS(K,D),1));
B2:=REF(C,A2+1)>C AND REF(K,A2+1)
B3:=REF(C,A3+1)>C AND REF(RSI1,A3+1)
D1:=REF(C,C1+1)
C2:=BARSLAST(REF(CROSS(D,K),1));
D2:=REF(C,C2+1)
C3:=BARSLAST(REF(CROSS(RSI2,RSI1),1));
D3:=REF(C,C3+1)
LL:= CONST(LLV(MacD, 180));
HH:= CONST(HHV(MACD, 180));
MACD底背:IF(B1>0, 1,0),NODRAW,colorred;
RSI底背:IF(B3>0, 1,0),NODRAW,COLORPURPLE;
kdj底背:IF(B2>0, 1,0),NODRAW,COLORFF00FF;
MACD顶背:IF(D1>0, 1,0),NODRAW,COLOR00FF00;
kdJ顶背:IF(D2>0, 1,0),NODRAW,COLORFFCC66;
RSI顶背:IF(D3>0,1,0),NODRAW,colorblack;
STICKLINE(B1>0, LL,0,2,0), colorred;
STICKLINE(B2>0, LL * 0.75 ,0,2,0), COLORFF00FF;
STICKLINE(B3>0, LL * 0.5, 0,2,0), COLORPURPLE;
STICKLINE(D1>0,0,HH,2,0), COLOR00FF00;
STICKLINE(D2>0,0,HH * 0.75,2,0), COLORFFCC66;
STICKLINE(D3>0,0,HH * 0.75,2,0), colorblack;
M1 := EMA( CLOSE, 9 );
M2 := EMA( CLOSE, 18 );
MD : M1 - M2, colorwhite, LINETHICK3;
MM := EMA( MD, 3 );
吸 : IF( MD >= MM AND MD < 0, MD, DRAWNULL ), colorlired, LINETHICK3;
拉 : IF( MD >= MM AND MD >= 0, MD, DRAWNULL ), colorred, LINETHICK3;
派 : IF( MD < MM AND MD >= 0, MD, DRAWNULL ), colorgreen, LINETHICK3;
落 : IF( MD < MM AND MD < 0, MD, DRAWNULL ), colorwhite, LINETHICK3;
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA/2);
AH:=HHV(MACD,13*1);
AL:=LLV(MACD,13*0.3);
STICKLINE(MACD>0 ,MACD,0,1,0),COLOR0000AA,LINETHICK1;
STICKLINE(MACD<0 ,MACD,0,1,0),COLOR008800,LINETHICK1;
趋势线:=EMA(MACD,34,1);
PARTLINE(趋势线,趋势线>REF(趋势线,1),RGB(255,255,0),趋势线
FILLRGN(趋势线,REF(趋势线,1),趋势线>REF(趋势线,1),RGB(255,255,0),趋势线<=REF(趋势线,1),RGB(0,88,255));
K:=SMA(MACD,2,1);
D:=SMA(K,2,1);
J:SMA(D,2,1);
STICKLINE(MACD>0,0.000001,0.000003,15,0),colorred;
STICKLINE(MACD<0,0.000001,0.000003,15,0),colorgreen;
PARTLINE(K,K>REF(K,1),RGB(255,0,0),K
PARTLINE(D,D>REF(D,1),RGB(255,0,0),D
PARTLINE(J,J>REF(J,1),RGB(255,0,0),J
STICKLINE(REF(MACD,1)
STICKLINE(REF(MACD,2)>MACD,MACD,REF(MACD,1),8,1),colorgreen;