P1:=-6;
bias1:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
BIAS2:=(CLOSE-MA(CLOSE,12))/MA(CLOSE,12)*100;
BIAS3:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
MM:=(BIAS1+2*BIAS2+3*BIAS3)/6;
股价趋势:=MA(MM,3);
买入信号:=EMA(股价趋势,2);
选股:crOSS(股价趋势,买入信号) AND COUNT(买入信号<P1,2)>1;