DIF:EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:EMA(DIF,9);
macd:(DIF-DEA)*2,COLORSTICK;
STICKLINE(MacD>=0,MACD,0,0,0),COLORF00FF0;
STICKLINE(MACD<0,MACD,0,0,0),COLORF00FF0;
STICKLINE(MACD0,0,MACD,0,0 ),COLORFFFF00;
STICKLINE(MACD<=REF(MACD,1)AND MACD<0,0,MACD,0,0 ),COLORFFFF00;
IF(DIF<0,DIF,0),COLORRED,LINETHICK1;
IF(DIF<0,0,DIF),COLORRED,LINETHICK1;
IF(DIF
STICKLINE(DIF<0 AND crOSS(DIF,DEA),DEA,0,0,0),COLORRED;
STICKLINE(DIF>0 AND CROSS(DEA,DIF),DEA,0,0,0),COLORGREEN;
STICKLINE(DIF<0 AND CROSS(DIF,DEA),DEA,0,0,0),COLORRED;
STICKLINE(DIF>0 AND CROSS(DEA,DIF),DEA,0,0,0),COLORGREEN;
DRAWTEXT(DIF<0 AND CROSS(DIF,DEA),DEA/2,'———————————');
DRAWTEXT(DIF>0 AND CROSS(DEA,DIF),DEA/2,'———————————');