AA05:=MA(C,5);
五日乖离率:=(c-AA05)/AA05*100;
BB05:=atan((aa05/ref(aa05,1)-1)*100)*180/3.1416;
速度5:=sma(ema((AA05-ref(AA05,1))/ref(AA05,1),3)*100,3,1);
加速度5:=ema((速度5-ref(速度5,1)),3);
AA10:=MA(C,10);AA20:=MA(c,20);
BB10:=atan((aa10/ref(aa10,1)-1)*100)*180/3.1416;
AA30:=MA(C,30);
三拾日乖离率:=(c-AA30)/AA30*100;
Var1:=(AA20-AA30)>ref((AA20-AA30),1) and AA20>ref(aa20,1) and AA30>ref(AA30,1);
Var2:=(AA30-AA20)<ref((AA30-AA20),1) and AA20<ref(aa20,1) and AA30<ref(AA30,1);
BB30:=atan((aa30/ref(aa30,1)-1)*100)*180/3.1416;
强势狙击:filter(BB30>30 and BB10>45 and cross(BB05,60),10);
加仓:filter(count(cross(BB05,30),5)>=1 and AA05>ref(aa05,1) and 三拾日乖离率>ref(三拾日乖离率,1) and AA10>ref(AA10,1)
and 加速度5>ref(加速度5,1) and 速度5>ref(速度5,1) ,10) ;
MR:=count(cross(五日乖离率,0),3)>=1 and 三拾日乖离率>ref(三拾日乖离率,1) and AA05>ref(AA05,1) and (c/ref(c,1)-1)*100>5 and ref(c,1)<AA30;
买入:filter(MR,10);