趋势强A:=IF(SAR(10,2,20)<=L,sar(10,2,20),DRAWNULL),COLORRED;
趋势弱A:=IF(SAR(10,2,20)>=H,SAR(10,2,20),DRAWNULL),COLORCYAN;
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);
趋势力度:=(3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*
SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1)),COLORCYAN;
异动0:=短红升 OR 中红升 OR 长红升;
异动8:=REF(趋势弱A,1)>0 AND 趋势强A>0;{--拐点B--}
异动9:=异动8 AND 趋势力度<=50 AND 异动0 AND C>REF(C,1)*1.04 AND vol>REF(VOL,1);
拐点B:异动9;