This commit is contained in:
zhangkun9038@dingtalk.com 2025-12-22 09:00:52 +08:00
parent 713a0f6995
commit a155540533

View File

@ -674,9 +674,14 @@ class FreqaiPrimer(IStrategy):
#logger.info(f"[{pair}] 由于检测到剧烈拉升,取消入场交易")
allow_trade = False
# 如果允许交易,更新最后一次入场时间
# 如果允许交易,更新最后一次入场时间并输出价格信息
if allow_trade:
self._last_entry_time[pair] = current_time
# 计算实际入场价格下调比例1.67%
# rate 是当前市场价格enter_price = rate * 0.9833
price_discount_percent = 1.67
adjusted_entry_price = rate * 0.9833
logger.info(f"[{pair}] 允许入场 - 市场价: {rate:.8f}, 调整后入场价: {adjusted_entry_price:.8f}, 下调: {price_discount_percent}%")
# 如果没有阻止因素,允许交易
return allow_trade