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{www.9m8.cn}545454},LINETHICK1{www.9m8.cn},NODRAW};
XG:=NOT(REF(MACD120,1)=MACD120);
{www.9m8.cn}STICKLINE(XG,0,MACD,0,0),COLORYELLOW;}
STICKLINE(MACD =MACD250,-100,-200,2,0),COLORMAGENTA;
{www.9m8.cn}STICKLINE(MACD =MACD250 AND MACD REF(MACD,1),MACD,前高1,1,0),COLORYELLOW;}
大行情:=NOT(REF(MACD120,1)=REF(MACD250,1)) AND MACD120=MACD250;
{www.9m8.cn}DRAWICON(大行情,0,11);{www.9m8.cn}11为手指型图案}
STICKLINE(XG,-100,-200,2,0),COLORYELLOW;
{www.9m8.cn}STICKLINE(大行情,0,走势柱,2,0),COLORYELLOW;};