FL:=MA(CLOSE,13)+Abs(MA(CLOSE,13)-REF(MA(CLOSE,13),1));
FS:=MA(CLOSE,13)+MA(CLOSE,13)-REF(MA(CLOSE,13),1);
CG:=IF(MA(CLOSE,13)<FS,FS,MA(CLOSE,13));
A:=CG-(EMA(C,3)-CG);
X:=(20*A+19*REF(A,1)+18*REF(A,2)+17*REF(A,3)+16*REF(A,4)+15*REF(A,5)+14*REF(A,6)+13*REF(A,7)+12*REF(A,8)+11*REF(A,9)+10*REF(A,10)+9*REF(A,11)+8*REF(A,12)+7*REF(A,13)+6*REF(A,14)+5*REF(A,15)+4*REF(A,16)+3*REF(A,17)+2*REF(A,18)+REF(A,20))/210;
mtm:=C-REF(C,1);
DX:=100*EMA(EMA(MTM,6),6)/EMA(EMA(ABS(MTM),6),6);
买1:=IF(LLV(DX,2)=LLV(DX,7) AND COUNT(DX<0,2) AND crOSS(DX,MA(DX,2)),1,0);
红钻:FILTER(买1=1,5);