第1个回答 2023-04-05
:
//获取收盘价和成交量
close = close(price) //收盘价
volume = volume() //成交量
//计算20日线
ma20 = ma(close, 20)
//涨停
limit_up = (close / delay(close, 1) - 1) > 0.099
//缩量回踩20日线
pullback = (1 - volume / delay(volume, 1)) and close < ma20
//连续4天收盘大于20日线
upward_trend = (close > ma20 and delay(close > ma20, 1) and delay(close > ma20, 2) and delay(close > ma20, 3))
//筛选符合条件的股票
choose(stock, limit_up and pullback and upward_trend)