fix: intraday journal entry type limited to four options
日内复盘开仓类型仅保留假破、结构突破、回调触价、突破触价;移除旧趋势长句与策略项。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<input name="real_rr" class="journal-field-num" placeholder="实际RR">
|
||||
</div>
|
||||
<div class="form-grid journal-form-row2">
|
||||
<select name="entry_reason" id="journal-entry-reason" class="journal-field-entry-reason" required title="启动A/B、大分歧A/B、小分歧或策略项">
|
||||
<select name="entry_reason" id="journal-entry-reason" class="journal-field-entry-reason" required title="日内:假破/结构突破/回调触价/突破触价;趋势户:反转/顺势/波段或策略项">
|
||||
<option value="">开仓类型(必选)</option>
|
||||
{% for er in entry_reason_options %}
|
||||
<option value="{{ er }}">{{ er }}</option>
|
||||
|
||||
@@ -302,9 +302,16 @@ def normalize_review_entry_reason(raw: Optional[str], allowed: Sequence[str]) ->
|
||||
return ""
|
||||
|
||||
|
||||
# 日内复盘开仓类型:手动假破/结构突破 + 自动触价(与 KEY_ENTRY_REASON_TRIGGER_OPTIONS 一致)
|
||||
_INTRADAY_JOURNAL_KEY_ENTRY_REASONS: Tuple[str, ...] = (
|
||||
"关键位回调触价开仓",
|
||||
"关键位突破触价开仓",
|
||||
)
|
||||
|
||||
|
||||
def trend_manual_entry_reason_count(policy: TradePolicy) -> int:
|
||||
if is_intraday_trading_profile(policy):
|
||||
return len(INTRADAY_LEGACY_TREND_ENTRY_REASONS) + len(intraday_entry_reason_display_options())
|
||||
return len(intraday_entry_reason_display_options())
|
||||
return len(trend_div_entry_reason_display_options()) + len(TRADE_STYLE_FALLBACK_ENTRY_REASONS)
|
||||
|
||||
|
||||
@@ -318,12 +325,9 @@ def build_intraday_entry_reason_options(
|
||||
key_options: Sequence[str],
|
||||
strategy_options: Sequence[str],
|
||||
) -> Tuple[str, ...]:
|
||||
return (
|
||||
INTRADAY_LEGACY_TREND_ENTRY_REASONS
|
||||
+ intraday_entry_reason_display_options()
|
||||
+ tuple(key_options)
|
||||
+ tuple(strategy_options)
|
||||
)
|
||||
del strategy_options # 日内户无趋势回调/顺势加仓
|
||||
del key_options
|
||||
return intraday_entry_reason_display_options() + _INTRADAY_JOURNAL_KEY_ENTRY_REASONS
|
||||
|
||||
|
||||
def entry_reason_options_for_policy(
|
||||
|
||||
Reference in New Issue
Block a user