调整一下买入和卖出的指标

This commit is contained in:
lzybetter
2026-07-23 17:18:12 +08:00
parent 93c19ce753
commit 30219cfbdc
2 changed files with 30 additions and 3 deletions
+2
View File
@@ -84,6 +84,7 @@ class FeatureEngine:
latest = self.df.iloc[-1]
prev = self.df.iloc[-2]
prev_2 = self.df.iloc[-3]
prev_3 = self.df.iloc[-4]
# 如果 5分钟线数据拿到了,现价以 5分钟最新收盘价为准(更接近 14:48 真实盘面)
# 如果没拿到,退化使用日线昨日收盘(做测试用)
@@ -123,6 +124,7 @@ class FeatureEngine:
features["cci"] = latest["cci"]
features["prev_cci"] = prev["cci"]
features["prev_cci_2"] = prev_2["cci"]
features["prev_cci_3"] = prev_3["cci"]
history_bw = self.df["bandwidth"].iloc[-250:]
features["bw_quantile"] = (history_bw < latest["bandwidth"]).mean()