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