网友求助:
把强班优化的 {涨停回马枪} 改成大智慧的
{涨停回马枪}
TS:= BARSLAST(C/REF(C,1)>1.05);{上一个涨停距今天数}
A1:= REF(L,TS);{涨停当天最低价}
A2:= IF(REF(L,TS)>REF(C,TS+1),REF(C,TS+1),REF(O,TS));{涨停当天最低价}
A3:= TS<=15 AND TS>=2; {天数条件}
A4:= C>=A2 AND L/A2<=1.035 AND L/A2>=0.97;{价格条件}
A5:= V<REF(V,1);{成交量条件}
A6:= ABS(C/O-1)*100<5;{K线条件}
A7:= LLV(C,TS)>=A2;{单阳不破}
A8:= MACD.MACD>-1;{MACD条件}
XG: A2 AND A3 AND A4 AND A5 AND A6 AND A7 AND A8
AND V<MA(V,5) AND REF(C,1)<REF(O,1) AND C>O;
解答如下:
TS:= BARSLAST(C/REF(C,1)>1.05);{上一个涨停距今天数}
A1:= REF(L,TS);{涨停当天最低价}
A2:= IF(REF(L,TS)>REF(C,TS+1),REF(C,TS+1),REF(O,TS));{涨停当天最低价}
A3:= TS<=15 AND TS>=2; {天数条件}
A4:= C>=A2 AND L/A2<=1.035 AND L/A2>=0.97;{价格条件}
A5:= V<REF(V,1);{成交量条件}
A6:= ABS(C/O-1)*100<5;{K线条件}
A7:= LLV(C,TS)>=A2;{单阳不破}
A8:= "MACD.MACD">-1;{MACD条件}
XG: A2 AND A3 AND A4 AND A5 AND A6 AND A7 AND A8
AND V<MA(V,5) AND REF(C,1)<REF(O,1) AND C>O;