DIF:=EMA(CLOSE,12)-EMA(CLOSE,26),NODRAW;
DEA:=EMA(DIF,9),NODRAW;
macd:=(DIF-DEA)*6,NODRAW;
MAX_MacD:=CONST(HHV(MAX(Abs(DIF),ABS(DEA)),365));
NOTEXTMACD1:=(100 * MACD) / MAX_MACD + 50;
STICKLINE(NOTEXTMACD1>50,50,NOTEXTMACD1,50,50),COLORRED;
STICKLINE(NOTEXTMACD1<=50,50,NOTEXTMACD1,50,50),COLORCYAN;
NOTEXTDIF1:(100 * DIF*3) / MAX_MACD + 50,COLORLIGREEN;
NOTEXTDEA1:(100 * DEA*3) / MAX_MACD + 50,COLORYELLOW;
NOTEXT强:IF(NOTEXTDIF1>MA(NOTEXTDIF1,2),NOTEXTDIF1,DRAWNULL),COLORRED,LINETHICK2;