DIFF:EMA(CLOSE,12) - EMA(CLOSE,26),colorwhite,LINETHICK2;
DEA:EMA(DIFF,9),LINETHICK2,coloryellow;
macd:2*(DIFF-DEA), COLORSTICK,LINETHICK4;
红柱天数:LAST(MacD>0),PRECIS0,colorred,linethick0;
死叉天:=LAST(MACD<0);
死叉天数:REF(死叉天,1),PRECIS0,colorgreen,linethick0;