编写要求:
1、20日均线在60日均线上方; 2、昨日6RSI1值小于50;3、昨日6RSI1小于12RSI2; 4、昨日6RSI1值小于前日6RSI1值;5、今日6RSI1值大于昨日6RSI1值; 6、今日K线为阳线; 7、去除停牌股票。
公式在线网解答:
N1:=6;
N2:=12;
N3:=24;
LC:=REF(CLOSE,1);
RSI1:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;
RSI2:=SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100;
RSI3:=SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100;
MH:MA(C,20)>MA(C,60) AND REF(RSI1,1)<50 AND REF(RSI1,1)<RSI2 AND REF(RSI1,1)<REF(RSI1,2) AND RSI1>REF(RSI1,1) AND C>O AND NOT(DYNAINFO(4)=0);