布林带下轨
This commit is contained in:
parent
98786d1118
commit
b7864d69cd
@ -985,15 +985,16 @@ class FreqaiPrimer(IStrategy):
|
||||
logger.info(f"[{pair}] 🟢 牛市绿色通道:持仓{open_trades}≤2个,25USDT入场,5条件需要满足{satisfied_count}/4个")
|
||||
|
||||
elif trend_status == "bullish":
|
||||
# 牛市正常通道:持仓>2个,75USDT入场,必须满足全部7个条件,且价格必须低于EMA50
|
||||
cond1 = (dataframe["&-price_value_divergence"] < self.buy_threshold * 1.2) # 提高要求至1.2倍
|
||||
cond2 = (dataframe["volume_z_score"] > volume_z_score_threshold * 0.8) # 提高成交量要求至0.8倍
|
||||
cond3 = (dataframe["rsi"] < rsi_threshold * 1.07) # 提高要求至1.0倍
|
||||
cond4 = (dataframe["close"] <= dataframe["bb_lowerband"]) # 收盘价低于布林带下轨
|
||||
cond5 = (dataframe["stochrsi_k"] < stochrsi_threshold * 1.0) # 提高要求至1.0倍
|
||||
# 牛市正常通道:持仓>2个,75USDT入场,放宽条件以增加入场信号
|
||||
cond1 = (dataframe["&-price_value_divergence"] < self.buy_threshold * 1.5) # 进一步放宽至1.5倍
|
||||
cond2 = (dataframe["volume_z_score"] > volume_z_score_threshold * 0.6) # 放宽成交量要求至0.6倍
|
||||
cond3 = (dataframe["rsi"] < rsi_threshold * 1.05) # 进一步放宽至1.15倍
|
||||
cond4 = (dataframe["close"] <= dataframe["bb_lowerband"] * 1.05) # 略微放宽布林带条件
|
||||
cond5 = (dataframe["stochrsi_k"] < stochrsi_threshold * 1.1) # 放宽STOCHRSI要求至1.1倍
|
||||
cond6 = pd.Series([True] * len(dataframe), index=dataframe.index) # 取消熊市过滤
|
||||
cond7 = pd.Series([True] * len(dataframe), index=dataframe.index) # 取消超买过滤
|
||||
buy_condition = cond1 & cond2 & cond3 & cond4 & cond5 & cond6 & cond7 & price_below_ema50 & ~is_unstable_region & (high_position == 0)
|
||||
# 只需要满足5个核心条件即可入场
|
||||
buy_condition = (cond1 & cond2 & cond3 & cond4 & cond5) & cond6 & cond7 & price_below_ema50 & ~is_unstable_region & (high_position == 0)
|
||||
logger.info(f"[{pair}] 🚀 牛市正常通道:持仓{open_trades}>2个,75USDT入场,必须满足全部7个条件")
|
||||
|
||||
elif trend_status == "bearish":
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user