DIFF:EMA(CLOSE,10) - EMA(CLOSE,22),NODRAW;
DEA :EMA(DIFF,7.5),NODRAW;
macd :2*(DIFF-DEA),NODRAW;
DRAWBAND(DIFF,RGB(255,157,255),DEA,RGB(21,138,255));
STICKLINE(MACD>0,0,MACD,0.01,0) ,COLOR0000FF;
STICKLINE(MACD<0,0,MACD,0.01,0) ,COLORFFF000;
GMB:IF(crOSS(DIFF,DEA) AND DIFF>0,-0.02,DRAWNULL),CROSSDOT,LINETHICK4,COLOR0000FF;
GMC:IF(CROSS(DIFF,DEA) AND DIFF<0,-0.02,DRAWNULL),CROSSDOT,LINETHICK4,COLOR208FFF;
趋势:=(5)*(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))* (100),5,1))-(3)*(SMA(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(100),5,1),3,1))-SMA(SMA(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(100),5,1),3,1),2,1);
STICKLINE(趋势<=5,0,MACD,0.01,0) ,COLOR208FFF;
0,COLORFFFF00,LINETHICK1;
DRAWICON(CROSS(DIFF,DEA) AND DIFF>0,DEA,36);
DRAWICON(CROSS(DIFF,DEA) AND DIFF<0,DEA,37);
A1:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));
B1:=REF(C,A1+1)>C AND REF("MACD.DIF",A1+1)<"MACD.DIF" AND CROSS("MACD.DIF","MACD.DEA");
DRAWTEXT(FILTER(B1>0,5),0,'MACD'),COLORGREEN;
A2:=BARSLAST(REF(CROSS("kdj.K","kdJ.D"),1));
B2:=REF(C,A2+1)>C AND REF("KDJ.K",A2+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");
DRAWTEXT(FILTER(B2>0,5),MACD,'KDJ'),COLORYELLOW;
A3:=BARSLAST(REF(CROSS("rsi.RSI1","RSI.RSI2"),1));
B3:=REF(C,A3+1)>C AND REF("RSI.RSI1",A3+1)<"RSI.RSI1" AND CROSS("RSI.RSI1","RSI.RSI2");
DRAWTEXT(FILTER(B3>0,5),MACD,'RSI'),COLORCYAN;
C1:=BARSLAST(REF(CROSS("MACD.DEA","MACD.DIF"),1));
D1:=REF(C,C1+1)<C AND REF("MACD.DIF",C1+1)>"MACD.DIF" AND CROSS("MACD.DEA","MACD.DIF");
DRAWTEXT(FILTER(D1>0,5),MACD,'MACD'),COLORWHITE;
C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));
D2:=REF(C,C2+1)<C AND REF("KDJ.K",C2+1)>"KDJ.K" AND CROSS("KDJ.D","KDJ.K");
DRAWTEXT(FILTER(D2>0,5),MACD,'KDJ'),COLORWHITE;
C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));
D3:=REF(C,C3+1)<C AND REF("RSI.RSI1",C3+1)>"RSI.RSI1" AND CROSS("RSI.RSI2","RSI.RSI1");
DRAWTEXT(FILTER(D3>0,5),MACD,'RSI'),COLORMAGENTA;