编写要求:
4日均线和20日均线多头排列,4日回调20日不破(越近越好,最好粘合,但不破)当4日线重新拐头向上时发出预警.
公式在线网解答:
T1:=BARSLAST(CROSS(MA(C,4),MA(C,20)));
TJ1:=MA(C,4)>=MA(C,20);
TJ2:=HHV(MA(C,4),T1)/MA(C,20)>1.1;
TJ3:=LLV(MA(C,4),T1)/MA(C,20)<1.01;
盘子:=CAPITAL/100;
量比:=V/MA(V,5);
涨幅:=(C-REF(C,1))/REF(C,1)*100;
S1:=IF(CODELIKE('300'),0,1);
S2:=IF(NAMELIKE('S'),0,1);
S3:=IF(NAMELIKE('*'),0,1);
S4:=DYNAINFO(4)>0;
选股:S1 AND S2 AND S3 AND S4 AND MA(C,5)>REF(MA(C,5),1)
AND C<22 AND 盘子<=100000
AND 量比>=0.1 AND 涨幅>=0 AND 涨幅<=9.5 AND
COUNT(TJ1,T1)=T1 AND TJ2 AND TJ3 AND MA(C,4)>REF(MA(C,4),1) AND T1>=3;