{MACD月周日}
{当周DIF第一次上穿0轴,日DIF需要形成一次死叉,这个时候就是绝佳买点,此方法也适用月和周级别。}
月DIF:MA(MACD.DIF#MONTH,5);
月DEA:MA(MACD.DEA#MONTH,5);
VAR1:=MACD.DIF#MONTH;
VAR2:=MACD.DEA#MONTH;
DRAWBAND(月DEA,RGB(0,80,80),月DIF,RGB(120,0,0));
DRAWICON(CROSS(VAR1,VAR2),月DIF,1);
DRAWICON(CROSS(VAR2,VAR1),月DEA,2);
周DIF:MA(MACD.DIF#WEEK,5);
周DEA:MA(MACD.DEA#WEEK,5);
VAR3:=MACD.DIF#WEEK;
VAR4:=MACD.DEA#WEEK;
DRAWBAND(周DEA,RGB(0,130,0),周DIF,RGB(180,0,80));
DRAWICON(CROSS(VAR3,VAR4),周DEA,1);
DRAWICON(CROSS(VAR4,VAR3),VAR4,2);
DRAWBAND(EMA(EMA(CLOSE,12)-EMA(CLOSE,26),9),RGB(0,180,0),EMA(CLOSE,12)-EMA(CLOSE,26),RGB(250,0,0));
DIF:EMA(CLOSE,12)-EMA(CLOSE,26),COLORWHITE;
DEA:EMA(DIF,9),COLORYELLOW;
MACD:2*(DIF-DEA),COLORSTICK;