DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
DRAWBAND(MA(CLOSE,60),RGB(200,80,80),MA(CLOSE,120),RGB(0,0,115));
DRAWBAND(MA(CLOSE,N1),RGB(100,100,80),MA(CLOSE,N2),RGB(0,200,215));
MA1:MA(CLOSE,N1),LINETHICK3;
MA2:MA(CLOSE,N2),LINETHICK3;
MA55:MA(CLOSE,55),LINETHICK2,COLORGREEN;
MA24:MA(C,24),LINETHICK2,COLORBLUE;
MA360:MA(C,360),LINETHICK2,COLORYELLOW;
DRAWKLINE(HIGH,OPEN,LOW,CLOSE);
STICKLINE(DIF>REF(DIF,1),MA1,MA2,0.1,1),COLORMAGENTA;
STICKLINE(DIF<REF(DIF,1) OR MACD<REF(MACD,1),MA1,MA2,0.1,1),COLORGREEN;
PMA:MA(C,N1),COLORWHITE,LINETHICK3;
IF(PMA>REF(PMA,1),PMA,DRAWNULL),COLORRED,LINETHICK3;
IF(PMA<REF(PMA,1),PMA,DRAWNULL),COLORGREEN,LINETHICK3;
RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,9,1);
D:=SMA(K,9,1);
J:=3*K-2*D;
STICKLINE(CROSS(DIF,DEA) AND CROSS(K,D) AND CROSS(MA1,MA2),C,C,1,1);
DRAWICON(MA2>REF(MA2,1),MA2,1);
DRAWICON(MA2<REF(MA2,1),MA2,2);