aa:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
bb:=EMA(CLOSE,12)-EMA(CLOSE,26);
zz:=EMA(bb,9);
MACD:=(bb-zz)*2;
XG:CROSS(C,aa) AND MACD 0 AND REF(ALL(MACD REF(MACD,1),3),1) AND MACD REF(MACD,1);
aa:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
bb:=EMA(CLOSE,12)-EMA(CLOSE,26);
zz:=EMA(bb,9);
MACD:=(bb-zz)*2;
XG:CROSS(C,aa) AND MACD 0 AND REF(ALL(MACD REF(MACD,1),3),1) AND MACD REF(MACD,1);