让gemini给我优化了一版rl+1
This commit is contained in:
parent
d8a6b374a5
commit
f671f16574
@ -1,7 +1,7 @@
|
||||
---
|
||||
services:
|
||||
freqtrade:
|
||||
image: freqtradeorg/freqtrade:develop_freqai_withredis
|
||||
image: freqtrade:rl
|
||||
# image: freqtradeorg/freqtrade:develop
|
||||
# Use plotting image
|
||||
# image: freqtradeorg/freqtrade:develop_plot
|
||||
|
||||
@ -78,8 +78,11 @@ class FreqaiPrimer(IStrategy):
|
||||
dataframe["%-volume_change"] = dataframe["volume"].pct_change().fillna(0)
|
||||
dataframe["%-price_volume_corr"] = dataframe["close"].rolling(10).corr(dataframe["volume"]).fillna(0)
|
||||
|
||||
# 3. 价格偏离特征
|
||||
dataframe["%-bb_position"] = (dataframe["close"] - dataframe["bb_lower_1h"]) / (dataframe["bb_upper_1h"] - dataframe["bb_lower_1h"])
|
||||
# 3. 价格偏离特征 - 直接计算布林带而不依赖外部列
|
||||
bbands = ta.bbands(dataframe['close'], length=20, std=2)
|
||||
dataframe["%-bb_upper"] = bbands['BBU_20_2.0']
|
||||
dataframe["%-bb_lower"] = bbands['BBL_20_2.0']
|
||||
dataframe["%-bb_position"] = (dataframe["close"] - dataframe["%-bb_lower"]) / (dataframe["%-bb_upper"] - dataframe["%-bb_lower"])
|
||||
dataframe["%-hl_ratio"] = (dataframe["high"] - dataframe["low"]) / dataframe["close"]
|
||||
|
||||
# 4. VWAP 特征 (简化版)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user