{macd周叉 日线、周线、周&月金叉、死叉同一图}
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26);
DEA : EMA(DIFF,9);
MacD : 2*(DIFF-DEA), COLORSTICK;
周DIFF:=("MACD.DIFF#WEEK"(26,12,9));
周DEA:=("MACD.DEA#WEEK"(26,12,9));
周金▲:drawtext(cross("MACD.DIFF#WEEK"(26,12,9) ,"MACD.DEA#WEEK"(26,12,9)),0,'▲周'),COLORred;
周死▼:drawtext(cross("MACD.DEA#WEEK"(26,12,9) ,"MACD.DIFF#WEEK"(26,12,9)),0,'▼周'),COLORgreen;
月金个:drawtext(cross("MACD.DIFF#MONTH"(26,12,9) ,"MACD.DEA#MONTH"(26,12,9)),0,'个月'),COLORMAGENTA;
月死丫:drawtext(cross("MACD.DEA#MONTH"(26,12,9) ,"MACD.DIFF#MONTH"(26,12,9)),0,'丫月'),COLORYELLOW;
STICKLINE(MACD>=0,MACD,0,1.9,2),COLOR0000FF;
STICKLINE(MACD<0,MACD,0,1.9,2),COLORffFF00;
PARTLINE(DIFF,DIFF>=REF(DIFF,1),RGB(255,0,0),DIFF
DRAWTEXTAbs(500,1,'DIFF翻红,结合增仓及均线多头抓主升。'),linethick1,Color00ffff;
DRAWTEXTABS(750,1,'DIFF泛绿时持币,宁缺毋滥。'),linethick1,Color00ff00;