DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
a:=if(CROSS(0,dea),1,0);
a1:=if(diff<0 and CROSS(diff,dea),1,0);
SS:=IF(A,SUM(A1,0),0);
SSB:=HHV(SS,0);
SSS:=SUM(A1,0);
aa:=IF(SSS-SSB=2 AND SSS>REF(SSS,1),10,0);
xg:aa=10;