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) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -146,7 +146,7 @@ class XauStrategyConfig:
|
|||||||
sl_atr_multiplier: float = 2.0
|
sl_atr_multiplier: float = 2.0
|
||||||
min_ema200_tfs: int = 2
|
min_ema200_tfs: int = 2
|
||||||
allow_generic_trades: bool = True
|
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
|
weekend_filter: bool = True
|
||||||
min_atr_threshold: float = 1.0
|
min_atr_threshold: float = 1.0
|
||||||
v2_sl_atr_multiplier: float = 2.5
|
v2_sl_atr_multiplier: float = 2.5
|
||||||
|
|||||||
+3
-5
@@ -32,6 +32,7 @@ import sys
|
|||||||
import time
|
import time
|
||||||
from concurrent.futures import ThreadPoolExecutor
|
from concurrent.futures import ThreadPoolExecutor
|
||||||
from datetime import datetime, timezone
|
from datetime import datetime, timezone
|
||||||
|
from zoneinfo import ZoneInfo
|
||||||
from typing import Dict, List, Optional, Set
|
from typing import Dict, List, Optional, Set
|
||||||
|
|
||||||
import websockets
|
import websockets
|
||||||
@@ -299,7 +300,8 @@ def _format_stats_dashboard() -> str:
|
|||||||
if not _signal_stats:
|
if not _signal_stats:
|
||||||
return "📊 *Live Dashboard*\n\n_Waiting for first scan…_"
|
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}", ""]
|
lines = [f"📊 *Live Dashboard* — {now}", ""]
|
||||||
|
|
||||||
for symbol in SCAN_PAIRS:
|
for symbol in SCAN_PAIRS:
|
||||||
@@ -486,10 +488,6 @@ async def _scan_timeframe(
|
|||||||
_update_level_cache(reports)
|
_update_level_cache(reports)
|
||||||
_update_signal_stats(reports, tf)
|
_update_signal_stats(reports, tf)
|
||||||
|
|
||||||
if tf == Timeframe.M5:
|
|
||||||
logger.info("M5 scan: data analysis only — no Telegram broadcast")
|
|
||||||
return
|
|
||||||
|
|
||||||
await _refresh_dashboard(bot)
|
await _refresh_dashboard(bot)
|
||||||
|
|
||||||
actionable = [r for r in reports if r.signal_quality in ("A+", "A", "B", "C")]
|
actionable = [r for r in reports if r.signal_quality in ("A+", "A", "B", "C")]
|
||||||
|
|||||||
Reference in New Issue
Block a user