LONG:=26;SHORT:=12;MID:=9;
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG),LINETHICK1,COLORWHITE;DEA:EMA(DIF,MID),LINETHICK1,COLORWHITE;
MACD:(DIF-DEA)*2,COLORSTICK;
周DIFF:MA("MACD.DIF#WEEK"(LONG,SHORT,MID),5),LINETHICK1,COLORMAGENTA;
周DEA:MA("MACD.DEA#WEEK"(LONG,SHORT,MID),5),LINETHICK1,COLORMAGENTA;
周金▲:DRAWTEXT(CROSS("MACD.DIF#WEEK"(LONG,SHORT,MID) ,"MACD.DEA#WEEK"(LONG,SHORT,MID)),周DIFF,'▲'),COLORMAGENTA;
周死▼:DRAWTEXT(CROSS("MACD.DEA#WEEK"(LONG,SHORT,MID) ,"MACD.DIF#WEEK"(LONG,SHORT,MID)),周DEA,'▼')COLORGREEN;
月DIFF:MA("MACD.DIF#MONTH"(LONG,SHORT,MID),5),LINETHICK1,COLORBLUE;
月DEA:MA("MACD.DEA#MONTH"(LONG,SHORT,MID),5),LINETHICK1,COLORBLUE;
月金▲:DRAWTEXT(CROSS("MACD.DIF#MONTH"(LONG,SHORT,MID) ,"MACD.DEA#MONTH"(LONG,SHORT,MID)),月DIFF,'▲'),COLORRED;
月死▼:DRAWTEXT(CROSS("MACD.DEA#MONTH"(LONG,SHORT,MID) ,"MACD.DIF#MONTH"(LONG,SHORT,MID)),月DEA,'▼'),COLORYELLOW;