修复趋势回调顺势加仓的交易记录
This commit is contained in:
@@ -25,8 +25,12 @@ from strategy_trend_lib import (
|
||||
calc_risk_fraction,
|
||||
validate_trend_bounds,
|
||||
)
|
||||
from strategy_trade_labels import (
|
||||
ENTRY_REASON_TREND_PULLBACK,
|
||||
MONITOR_TYPE_TREND_PULLBACK,
|
||||
)
|
||||
|
||||
MONITOR_TYPE_TREND = "趋势回调"
|
||||
MONITOR_TYPE_TREND = MONITOR_TYPE_TREND_PULLBACK
|
||||
|
||||
|
||||
def trend_add_zone_label(direction: str) -> str:
|
||||
@@ -370,6 +374,7 @@ def _finalize_plan(cfg: dict, conn, row, result_label: str, exit_price: float) -
|
||||
result=res,
|
||||
opened_at=opened_at,
|
||||
closed_at=closed_at,
|
||||
entry_reason=ENTRY_REASON_TREND_PULLBACK,
|
||||
)
|
||||
if "trend_plan_id" in inspect.signature(m.insert_trade_record).parameters:
|
||||
m.insert_trade_record(**kwargs, trend_plan_id=plan_id)
|
||||
|
||||
Reference in New Issue
Block a user