DDATE:DATE,NODRAW,COLOR0000FF;
DIF:EMA(C,12)-EMA(C,26),COLORFF00FF;
DEA:EMA(DIF,9),COLORFF00FF;
MACD:(DIF-DEA)*2,COLORFF00FF,NODRAW;
NOTEXTMACD:MACD,COLORSTICK;
TESTSKIP(PERIOD!=5);
D1:=DATE;
DIF1:=MACD.DIF#WEEK;
DEA1:=MACD.DEA#WEEK;
WEK:=REFX(WEEKDAY<REF(WEEKDAY,1) OR
DATETODAY(DATE)-DATETODAY(REF(DATE,1))>=7,1) OR ISLASTBAR;
D2:=IF(WEK,D1,DRAWNULL);
DIF2:=IF(WEK,DIF1,DRAWNULL);
DEA2:=IF(WEK,DEA1,DRAWNULL);
WDATE:ALIGNRIGHT(D2),NODRAW,COLOR00BB99;
WDIF:ALIGNRIGHT(DIF2),NODRAW,COLOR00FF99;
WDEA:ALIGNRIGHT(DEA2),NODRAW,COLOR00FF99;
WMACD:(WDIF-WDEA)*2,NODRAW,COLOR00FF99;
A1:=CONST(LLV(MACD,150))*2;
Q:=0.6;
NOTEXT0:0,COLOR0000FF;
NOTEXT1:A1,COLOR336699,DOTLINE;
STICKLINE(MACD>0,0,MACD,1,0),COLOR0000AA;
STICKLINE(MACD<0,0,MACD,1,0),COLORFF0033;
STICKLINE(WMACD>0,A1,WMACD*Q+A1,0,-1),COLOR0099FF;
STICKLINE(WMACD<0,A1,WMACD*Q+A1,0,-1),COLOR999900;
NOTEXT1A:WDIF*Q+A1,COLOR00FF99,DOTLINE;
NOTEXT1B:WDEA*Q+A1,COLOR00FF99,DOTLINE;
NOTEXTA:DIF,COLORFF00FF,LINETHICK2;
NOTEXTB:DEA,COLORFF00FF,LINETHICK2;
(来源:文华财经)