有交易了,陪的不多 up5
Some checks are pending
Update Docker Hub Description / dockerHubDescription (push) Waiting to run
Some checks are pending
Update Docker Hub Description / dockerHubDescription (push) Waiting to run
This commit is contained in:
parent
2b63429372
commit
fac3bcdeb7
@ -280,13 +280,13 @@ class FreqaiExampleStrategy(IStrategy):
|
||||
# 更保守的止损和止盈设置
|
||||
dataframe["trailing_stop_positive"] = (dataframe["roi_0_pred"] * 0.3).clip(0.01, 0.2)
|
||||
dataframe["trailing_stop_positive_offset"] = (dataframe["roi_0_pred"] * 0.5).clip(0.01, 0.3)
|
||||
exit_long_conditions = [
|
||||
(df["rsi"] > df["sell_rsi_pred"]), # RSI 高于卖出阈值
|
||||
(df["volume"] > df["volume"].rolling(window=10).mean()), # 成交量高于近期均值
|
||||
(df["close"] < df["bb_middleband"]), # 价格低于布林带中轨
|
||||
(df["close"] < df["bb_lowerband"].shift(1)), # 当前价格低于上一周期的布林带下轨
|
||||
(df["volume"] < df["volume"].shift(1) * 0.9) # 当前成交量低于上一周期的10%
|
||||
]
|
||||
exit_long_conditions = [
|
||||
(df["rsi"] > df["sell_rsi_pred"]), # RSI 高于卖出阈值
|
||||
(df["volume"] > df["volume"].rolling(window=10).mean()), # 成交量高于近期均值
|
||||
(df["close"] < df["bb_middleband"]), # 价格低于布林带中轨
|
||||
(df["close"] < df["bb_lowerband"].shift(1)), # 当前价格低于上一周期的布林带下轨
|
||||
(df["volume"] < df["volume"].shift(1) * 0.9) # 当前成交量低于上一周期的10%
|
||||
]
|
||||
self.stoploss = -0.15 # 固定止损 15%
|
||||
self.minimal_roi = {
|
||||
0: float(self.roi_0.value),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user