BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
XG:CROSS(C,BBI) AND MACD 0 AND REF(EVERY(MACD REF(MACD,1),3),1) AND MACD REF(MACD,1);
BBI:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4;
DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
MACD:=(DIF-DEA)*2;
XG:CROSS(C,BBI) AND MACD 0 AND REF(EVERY(MACD REF(MACD,1),3),1) AND MACD REF(MACD,1);