A1:=1;
EM01:=EMA(C,13);
EM:=EMA(C,21);
UP:=EMA(EM,13);
DOWN:=EMA(EM,17);
短期趋势:=(EMA(EM01,2)+EMA(EM01,7))/2;
短红升:=IF(短期趋势>=REF(短期趋势,1),短期趋势,DRAWNULL);
中期趋势:=(UP+DOWN)/2,COLORYELLOW;
中红升:=IF(中期趋势>REF(中期趋势,1),中期趋势,DRAWNULL);
长期趋势:=EMA(C,144),COLORRED;
长红升:=IF(长期趋势>=REF(长期趋势,1),长期趋势,DRAWNULL);
异动0:=短红升 OR 中红升 OR 长红升;
N:=26;M1:=10;M2:=20;M3:=40;M4:=62;{--拐点A--}
N1:=26;N2:=12;M5:=6;N3:=9;M6:=3;M7:=3;
MID1:=REF(HIGH+LOW,1)/2;
cr:=SUM(MAX(0,HIGH-MID1),N)/SUM(MAX(0,MID1-LOW),N)*100;
MA1:=REF(MA(CR,M1),M1/2.5+1);
MA2:=REF(MA(CR,M2),M2/2.5+1);
MA3:=REF(MA(CR,M3),M3/2.5+1);
MA4:=REF(MA(CR,M4),M4/2.5+1);
BR:=SUM(MAX(0,HIGH-REF(CLOSE,1)),N1)/SUM(MAX(0,REF(CLOSE,1)-LOW),N1)*100;
AR:=SUM(HIGH-OPEN,N1)/SUM(OPEN-LOW,N1)*100;
PSY:=COUNT(CLOSE>REF(CLOSE,1),N2)/N2*100;
psyMA:=MA(PSY,M5);
RSV:=(CLOSE-LLV(LOW,N3))/(HHV(HIGH,N3)-LLV(LOW,N3))*100;
K:=SMA(RSV,M6,1);
D:=SMA(K,M7,1);
J:=3*K-2*D;
趋势:=SMA(((CLOSE-LLV(LOW,28))/(HHV(HIGH,28)-LLV(LOW,28))*100),3,1);
判断:=SMA(趋势,3,1);
异动1:=CR>MA1 AND CR>MA2 AND CR>MA3 AND CR>MA4;
异动2:=BR>AR;
异动3:=PSY>PSYMA;
异动4:=异动1 AND 异动2 AND 异动3;
异动5A:=(J<100 AND K>75) OR (J>100 AND K<75) OR (J<100 AND K<75);
异动5B:=J>K AND J>D AND K>D;
异动5:=异动5A AND 异动5B;
异动6:=判断>20 AND 判断<70 AND 趋势>判断;
异动7:=异动4=1 AND REF(异动4=0,1) AND 异动5 AND 异动6 AND 异动0;
拐点A:异动7;