07.4.4.1.9.6.2 Momentum & Breakout Semantic Engine

This commit is contained in:
2026-05-12 23:25:16 +03:00
parent 8b83055e6a
commit 4a34338041
10 changed files with 591 additions and 1 deletions

View File

@@ -182,6 +182,40 @@ def _execution_confidence_line(state) -> str:
return f"🧠 Уверенность входа · {percent}% низкая"
def _momentum_semantic_line(state) -> str:
momentum_state = getattr(state, "momentum_state", None)
momentum_direction = getattr(state, "momentum_direction", None)
momentum_strength = getattr(state, "momentum_strength", None)
if momentum_state in {None, "NONE", "UNKNOWN"}:
return ""
strength_text = ""
if momentum_strength is not None:
strength_text = f" · x{float(momentum_strength):.1f}"
if momentum_state == "BREAKOUT_UP":
return f"🚀 Импульс · пробой вверх{strength_text}"
if momentum_state == "BREAKOUT_DOWN":
return f"💥 Импульс · пробой вниз{strength_text}"
if momentum_state == "MOMENTUM_UP":
return f"⚡️ Импульс · вверх{strength_text}"
if momentum_state == "MOMENTUM_DOWN":
return f"⚡️ Импульс · вниз{strength_text}"
if momentum_direction == "UP":
return f"⚡️ Импульс · вверх{strength_text}"
if momentum_direction == "DOWN":
return f"⚡️ Импульс · вниз{strength_text}"
return ""
def _adaptive_size_line(state) -> str:
multiplier = getattr(state, "adaptive_size_multiplier", None)
@@ -224,6 +258,7 @@ def _build_waiting_text(state) -> str:
_signal_confirmation_line(state),
_execution_confidence_line(state),
_market_semantic_line(state),
_momentum_semantic_line(state),
_entry_block_line(state),
_execution_semantic_line(state),
*_signal_confidence_lines(state),
@@ -284,6 +319,7 @@ def _build_active_position_text(state) -> str:
market_lines = [
_market_semantic_line(state),
_momentum_semantic_line(state),
_execution_semantic_line(state),
]
market_lines = [line for line in market_lines if line]