SS:=12;
LL:=26;
MM:=9;
DIF:=100*(EMA(CLOSE,SS)-EMA(CLOSE,LL));
DEA:=EMA(DIF,MM);
macd:=(DIF-DEA)*2;
MacD120:=REF(MACD/2,BArslAST(MACD=HHV(MACD,120)));
MACD250:=REF(MACD/2,BARSLAST(MACD=HHV(MACD,250)));
XG:=NOT(REF(MACD120,1)=MACD120);
金柱:XG;