DIFF: EMA(CLOSE,24) - EMA(CLOSE,60),colorwhite;
DEA: EMA(DIFF,12),coloryellow;
macd2:=2*(DIFF-DEA),colorff00ff ;
DIFF1: EMA(CLOSE,10) - EMA(CLOSE,22),color00ff00;
DEA1: EMA(DIFF1,9),colorred;
MacD1:= 2*(DIFF1-DEA1),colorfccccc;
macd:(macd2+macd1)/2,COLORSTICK,linethick1;
stickline(DIFF-DEA>0,DIFF,DEA,4,0),color1234ff;
stickline(DIFF-DEA<0,DIFF,DEA,4,0),colorff4321;
stickline(DIFF1-DEA1>0,DIFF1,DEA1,4,0),colorccffff;
stickline(DIFF1-DEA1<0,DIFF1,DEA1,4,0),color65ff21;
stickline(macd>ref(macd,1) and (diff1+diff)/2>(dea1+dea)/2,macd,0,5,0),COLORff00ff;
stickline(macd>ref(macd,1) and (diff1+diff)/2>(dea1+dea)/2,macd,0,1,0),coloryellow;