Daniel Alnawaz commited on
Commit
fbcc53e
·
unverified ·
1 Parent(s): 1a292f6

updated status intervals

Browse files
Files changed (1) hide show
  1. adaptive_bot.py +12 -8
adaptive_bot.py CHANGED
@@ -657,6 +657,7 @@ class AdaptiveHyperliquidBot:
657
  self._http_server: Optional[ThreadingHTTPServer] = None
658
  self._entry_features: Dict[Tuple[str, int], List[float]] = {}
659
  self._last_ml_report_ts: float = 0.0
 
660
  self._advisor_stats: Dict[str, int] = {
661
  "requests": 0,
662
  "errors": 0,
@@ -1419,15 +1420,18 @@ class AdaptiveHyperliquidBot:
1419
  self.learning.save()
1420
  self.write_report()
1421
 
 
1422
  m = self.learning.global_metrics()
1423
- logger.info(
1424
- "Stats trades=%d win_rate=%.2f%% pf=%.2f paper_equity=%.2f profitable_gate=%s",
1425
- int(m["trades"]),
1426
- m["win_rate"] * 100.0,
1427
- m["profit_factor"],
1428
- self.paper.equity,
1429
- self.learning.consistently_profitable(),
1430
- )
 
 
1431
  self._maybe_notify_live_readiness()
1432
  self._maybe_prepare_live()
1433
  self._maybe_send_daily_summary()
 
657
  self._http_server: Optional[ThreadingHTTPServer] = None
658
  self._entry_features: Dict[Tuple[str, int], List[float]] = {}
659
  self._last_ml_report_ts: float = 0.0
660
+ self._last_stats_log_ts: float = 0.0
661
  self._advisor_stats: Dict[str, int] = {
662
  "requests": 0,
663
  "errors": 0,
 
1420
  self.learning.save()
1421
  self.write_report()
1422
 
1423
+ now_ts = time.time()
1424
  m = self.learning.global_metrics()
1425
+ if now_ts - self._last_stats_log_ts >= 300:
1426
+ logger.info(
1427
+ "Stats trades=%d win_rate=%.2f%% pf=%.2f paper_equity=%.2f profitable_gate=%s",
1428
+ int(m["trades"]),
1429
+ m["win_rate"] * 100.0,
1430
+ m["profit_factor"],
1431
+ self.paper.equity,
1432
+ self.learning.consistently_profitable(),
1433
+ )
1434
+ self._last_stats_log_ts = now_ts
1435
  self._maybe_notify_live_readiness()
1436
  self._maybe_prepare_live()
1437
  self._maybe_send_daily_summary()