SHORT:=12;
LONG:=26;
MID:=9;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG),COLORYELLOW,LINETHICK2;
DEA:EMA(DIF,MID);
macd:(DIF-DEA)*2,COLORSTICK;
S1:=DIF>DEA;
S2:IF(S1,DIF,DRAWNULL),COLORRED,LINETHICK2;
S3:=DIF<DEA;
S4:IF(S3,DIF,DRAWNULL),COLORGREEN,LINETHICK2;