TS:= BARSLAST(C/REF(C,1)*100-100>=9.9);{上一个涨停距今天数}
A2:= REF(C,TS);{涨停当天涨停价}
A3:= BETWEEN(TS,3,21); {天数条件}
A4:= L<=MA(C,5);{首次下破五日线价格}
A41:=L<=MA(C,10);{首次下破十日线价格}
A5:= V<REF(V,1) AND V<MA(V,5);{成交量条件}
A51:= V<REF(V,1) AND V<MA(V,10);{成交量条件}
A7:= LLV(C,TS)>=A2;{单阳不破}
A8:= MACD>-1;{MACD条件}
五日建仓:=A3 AND A4 AND A5 AND A7 AND A8;
十日建仓:=A3 AND A41 AND A51 AND A7 AND A8;
XG: 五日建仓 OR 十日建仓;