DIFF:=Ema(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
macd:=2*(DIFF-DEA),LINETHICK0;
A1:=DIFF<0 AND DEA<0;
A2:=A1>REF(A1,1);
A3:=BArslAST(A2);
A4:=COUNT(DEA>0 AND DIFF>0,A3)=0;
A5:=crOSS(DIFF,DEA);{金叉}
A6:=BARSLAST(A5);
A7:=REF(A6,A6+1)+A6;
A8:=(DIFF+DEA)/2;
A9:=(HIGH+LOW)/2;
A10:=A5 AND A7REF(A8,A7) AND A90;
金叉介入:A10;