DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
macd:=(DIF-DEA)*2;
TJ1:=IF(crOSS(DEA,DIF) ,DEA,DRAWNULL);
TJ2:=TJ1/2;
XG:BETWEEN(DIF,TJ2,TJ1) AND BETWEEN(DEA,TJ2,TJ1);
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
macd:=(DIF-DEA)*2;
TJ1:=IF(crOSS(DEA,DIF) ,DEA,DRAWNULL);
TJ2:=TJ1/2;
XG:BETWEEN(DIF,TJ2,TJ1) AND BETWEEN(DEA,TJ2,TJ1);