DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA),COLORRED;
MACD120:=REF(MACD/2,BARSLAST(MACD=HHV(MACD,120))),COLORA67D3D,LINETHICK1;
MACD250:=REF(MACD/2,BARSLAST(MACD=HHV(MACD,250))),COLORCYAN{545454},LINETHICK1{,NODRAW};
XG:=NOT(REF(MACD120,1)=MACD120);
STICKLINE(XG,0,MACD,0,0),COLORYELLOW;
STICKLINE(MACD>=MACD250,-100,-200,2,0),COLORMAGENTA;
大行情:=NOT(REF(MACD120,1)=REF(MACD250,1)) AND MACD120=MACD250;
DRAWICON(大行情,0,11); {11为手指型图案}
STICKLINE(XG,-100,-200,2,0),COLORYELLOW;