fix: intraday journal entry type limited to four options
日内复盘开仓类型仅保留假破、结构突破、回调触价、突破触价;移除旧趋势长句与策略项。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -8,6 +8,7 @@ from lib.trade.entry_model_lib import (
|
||||
ENTRY_MODEL_SMALL_DIV,
|
||||
ENTRY_CATEGORY_REVERSAL,
|
||||
ENTRY_CATEGORY_TREND,
|
||||
build_intraday_entry_reason_options,
|
||||
build_trend_div_entry_reason_options,
|
||||
entry_model_categories,
|
||||
entry_model_category,
|
||||
@@ -35,7 +36,7 @@ class TestEntryModelLib(unittest.TestCase):
|
||||
}
|
||||
)
|
||||
self.assertTrue(is_intraday_trading_profile(policy))
|
||||
self.assertEqual(trend_manual_entry_reason_count(policy), 7)
|
||||
self.assertEqual(trend_manual_entry_reason_count(policy), 2)
|
||||
|
||||
def test_trend_div_profile_alt(self):
|
||||
policy = load_trade_policy(
|
||||
@@ -149,6 +150,25 @@ class TestEntryModelLib(unittest.TestCase):
|
||||
self.assertIn("波段单", opts)
|
||||
self.assertIn("趋势回调", opts)
|
||||
|
||||
def test_build_intraday_journal_options_only_four(self):
|
||||
opts = build_intraday_entry_reason_options(
|
||||
(
|
||||
"关键位箱体突破",
|
||||
"关键位回调触价开仓",
|
||||
"关键位突破触价开仓",
|
||||
),
|
||||
("趋势回调", "顺势加仓"),
|
||||
)
|
||||
self.assertEqual(
|
||||
opts,
|
||||
(
|
||||
"波段单/假破",
|
||||
"波段单/结构突破",
|
||||
"关键位回调触价开仓",
|
||||
"关键位突破触价开仓",
|
||||
),
|
||||
)
|
||||
|
||||
def test_normalize_review_entry_reason(self):
|
||||
from lib.trade.entry_model_lib import normalize_review_entry_reason
|
||||
|
||||
|
||||
Reference in New Issue
Block a user