P1:=5;P2:=30;
A1:=MA(CLOSE,P1);A2:=REF(A1,1);J1:=(A1-A2)/A2*100;MJ1:=MA(J1,3);
A3:=MA(CLOSE,P2);A4:=REF(A3,1);J2:=(A3-A4)/A4*100;MJ2:=MA(J2,10);
A5:=MA(C,10);A6:=REF(A5,1);
J3:=(A5-A6)/A6*100;MJ3:=MA(J3,5);
向上拐点:IF(COUNT(CROSS(J1,0),3)>=1 AND MJ1>MJ3 AND MJ3>REF(MJ3,1) AND J3>=0 AND J1>REF(J1,1),5,0);