DIFF:(EMA(CLOSE,8) - EMA(CLOSE,13)),colorred,linethick3;
DEA:EMA(DIFF,9),colorff00ff;
macd:2*(DIFF-DEA), COLORSTICK;
MacD1:2*(DIFF-DEA), COLORffffff;
stickline(macd>0 and macd>ref(macd,1),macd,0,5,0),colorff99ff,stick;
stickline(macd<0 and macd>ref(macd,1),macd,0,5,0),colorffffff,stick;
v1:if(diff<0,diff,0),coloryellow,linethick2;
v2:if(diff<0,0,diff),colorred,linethick2;
v3:if(diff
aa:=cross(diff,dea);
DRAWICON(aa,-0.02,1);