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 长红升;
异动14:=C=LLV(C,60);{--拐点D--}
异动15:=BArslAST(异动14);
异动16:=BETWEEN(异动15,1,60) AND C/REF(C,1)>1.043;
异动17:=异动16 AND COUNT(异动16,异动15)=1 AND 异动0;
拐点D:异动17;