feat(key-monitor): add program trigger entry across four exchanges
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -310,6 +310,7 @@ def key_monitor_rule_template_context(
|
||||
key_stop_outside_breakout_pct: float,
|
||||
key_trend_stop_outside_pct: float,
|
||||
false_breakout_validity_hours: int,
|
||||
trigger_entry_validity_hours: int | None = None,
|
||||
) -> dict[str, Any]:
|
||||
"""关键位监控页规则说明表格(Jinja key_rule_ctx)。"""
|
||||
from false_breakout_key_monitor_lib import (
|
||||
@@ -317,6 +318,13 @@ def key_monitor_rule_template_context(
|
||||
FALSE_BREAKOUT_RR,
|
||||
FALSE_BREAKOUT_SL_PCT,
|
||||
)
|
||||
from trigger_entry_key_monitor_lib import TRIGGER_ENTRY_VALIDITY_HOURS
|
||||
|
||||
te_hours = (
|
||||
int(trigger_entry_validity_hours)
|
||||
if trigger_entry_validity_hours is not None
|
||||
else TRIGGER_ENTRY_VALIDITY_HOURS
|
||||
)
|
||||
|
||||
return {
|
||||
"tf": (kline_timeframe or "5m").strip(),
|
||||
@@ -335,4 +343,5 @@ def key_monitor_rule_template_context(
|
||||
"fb_sl_pct": FALSE_BREAKOUT_SL_PCT,
|
||||
"fb_rr": FALSE_BREAKOUT_RR,
|
||||
"fb_valid_hours": false_breakout_validity_hours,
|
||||
"trigger_entry_validity_hours": te_hours,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user