DIFF:(EMA(EMA(C,13),13)/REF(EMA(EMA(C,13),13),1)-1)*1000;
DEA:EMA(DIFF,9);
macd:(DIFF-DEA)*2,COLORSTICK;
STICKLINE(MacD>0,0,MACD,-1,0),COLORLIRED;
STICKLINE(MACD<0,0,MACD,-1,0),COLORLIBLUE;
NOTEXTD:=REF(DIFF,1);
NOTEXT1:IF(DIFF<0,DIFF,DIFF),LINETHICK2,COLORLIRED;
NOTEXT2:IF(DIFF>0,DIFF,DRAWNULL),LINETHICK2,COLORRED;
NOTEXT3:IF(DIFF<NOTEXTD,DIFF,DRAWNULL),LINETHICK2,COLORGREEN;
NOTEXT4:IF(DIFF<=NOTEXTD AND DIFF<=0,DIFF,DRAWNULL),LINETHICK2,COLORWHITE;