A1:=(CLOSE-LLV(LOW,7))/(HHV(HIGH,7)-LLV(LOW,7))*100;
K:=MA(3*SMA(A1,6,1)-2*SMA(SMA(A1,5,1),5,1),3);
D:=MA(K,3);
A5:=MA(3*SMA((C-LLV(L,21))/(HHV(H,21)-LLV(L,21))*100,5,1)-2*SMA(SMA((C-LLV(L,21))/(HHV(H,21)-LLV(L,21))*100,5,1),3,1),3);
A8:=BArslAST(REF(crOSS(K,D),1));
二次金叉:=(A8<15 AND D<50 AND K>REF(K,A8+1) AND CROSS(K,D)AND A5<60);
A9:=LLV(C,2)<REF(LLV(C,15),2);
底背离:二次金叉 AND A9;