From b7bfd9c830ccc6655296a97b3dd83db4dd587a62 Mon Sep 17 00:00:00 2001 From: harwinder Date: Fri, 15 May 2026 15:23:48 -0400 Subject: [PATCH] Reduce blocked hours, enable M5 alerts, show NY time on dashboard - Blocked hours reduced to 0-2 UTC only (daily rollover) - M5 signals now broadcast to Telegram like M15/H1/H4 - Live dashboard shows New York time (auto EDT/EST via zoneinfo) --- config.py | 2 +- telegram_bot.py | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/config.py b/config.py index 3c67e4c..dec028d 100755 --- a/config.py +++ b/config.py @@ -146,7 +146,7 @@ class XauStrategyConfig: sl_atr_multiplier: float = 2.0 min_ema200_tfs: int = 2 allow_generic_trades: bool = True - blocked_hours_utc: List[int] = field(default_factory=lambda: [0, 1, 2, 5, 6, 21, 22, 23]) + blocked_hours_utc: List[int] = field(default_factory=lambda: [0, 1, 2]) weekend_filter: bool = True min_atr_threshold: float = 1.0 v2_sl_atr_multiplier: float = 2.5 diff --git a/telegram_bot.py b/telegram_bot.py index ac016c2..22c1269 100755 --- a/telegram_bot.py +++ b/telegram_bot.py @@ -32,6 +32,7 @@ import sys import time from concurrent.futures import ThreadPoolExecutor from datetime import datetime, timezone +from zoneinfo import ZoneInfo from typing import Dict, List, Optional, Set import websockets @@ -299,7 +300,8 @@ def _format_stats_dashboard() -> str: if not _signal_stats: return "πŸ“Š *Live Dashboard*\n\n_Waiting for first scan…_" - now = datetime.now(timezone.utc).strftime("%H:%M:%S UTC") + _ny_tz = ZoneInfo("America/New_York") + now = datetime.now(_ny_tz).strftime("%H:%M:%S %Z") lines = [f"πŸ“Š *Live Dashboard* β€” {now}", ""] for symbol in SCAN_PAIRS: @@ -486,10 +488,6 @@ async def _scan_timeframe( _update_level_cache(reports) _update_signal_stats(reports, tf) - if tf == Timeframe.M5: - logger.info("M5 scan: data analysis only β€” no Telegram broadcast") - return - await _refresh_dashboard(bot) actionable = [r for r in reports if r.signal_quality in ("A+", "A", "B", "C")]