refactor(auto): improve runtime reset structure and observing UI
This commit is contained in:
@@ -1535,8 +1535,16 @@ def _trade_word(value: int) -> str:
|
||||
|
||||
|
||||
def _cycle_summary_lines(state) -> list[str]:
|
||||
# Единый блок статистики текущего цикла.
|
||||
# Показываем номер цикла всегда, даже если закрытых сделок ещё нет.
|
||||
status = str(getattr(state, "status", "") or "").upper()
|
||||
|
||||
# В режиме наблюдения торгового цикла нет:
|
||||
# бот только анализирует рынок и не исполняет сделки.
|
||||
if status == "OBSERVING":
|
||||
return ["🔬 Анализ рынка"]
|
||||
|
||||
if status != "RUNNING":
|
||||
return []
|
||||
|
||||
cycle_trades = int(getattr(state, "cycle_closed_trades", 0) or 0)
|
||||
cycle_pnl = float(getattr(state, "cycle_realized_pnl_usd", 0.0) or 0.0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user