M6:=(EMA(C,5)+EMA(C,6))/2;
M12:=EMA(C,12);
M26:=EMA(C,26);
M56:=EMA(C,56);
M121:=EMA(C,121);
XDIF:((M6-M121)/2+(M12-M56+M26-M121)/2+M6-M26)/3,COLORWHITE;
XDEA:EMA(XDIF,3),COLORCYAN;
XMACD:=2*(XDIF-XDEA),LINETHICK,COLORWHITE;
DIF:(M56-M121+(M26-M121)/2+(M12-M121)/3+(M6-M121)/4)/4,COLORMAGENTA;
DEA:EMA(DIF,9),COLORGREEN;
MACD:2*(DIF-DEA),LINETHICK,COLOR00CCCC;
BMACD:(MACD+XMACD/2)/2,LINETHICK,COLORRED;
STICKLINE(BMACD =0,0,BMACD,2,1),COLORRED;
STICKLINE(BMACD 0,0,BMACD,2,1),COLOR00BB00;
STICKLINE(MACD =0,0,MACD,0,0),COLOR00CCCC;
STICKLINE(MACD 0,0,MACD,0,0),COLORCYAN;
JGL:=(((XDIF-XDEA)/ABS(XDEA)+(XDEA-DIF)/ABS(DIF)+(DIF-DEA)/ABS(DEA))/3)*10;
DRAWTEXT(CROSS(JGL,0)AND XDIF REF(XDIF,1),DEA*0.9,'★'),COLORYELLOW;