Tighten signal pipeline: yfinance-only XAU/XAG, leaner Telegram /scan
- XAU/XAG always route to Yahoo Finance and skip Twelve Data entirely (excluded from batch prefetch, served per-symbol via yfinance). - Daily chart cleanly skipped for gold/silver — engine drops it from MTF. - Telegram /scan limited to EURUSD, USDJPY, GBPUSD, XAUUSD. - SCAN_TIMEFRAMES reduced to single H1 primary; engine still pulls M15+H1+D1 internally via confirmation TFs (halves API credits per scan). - Default confirmation TFs swapped H4 -> D1 in config and main.py. - mtf_agreement_threshold kept at 2-of-3. - CLAUDE.md cleaned up — old XAUUSD/synthetic-data bug reports removed. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
+7
-3
@@ -40,7 +40,11 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
# ── Config ──────────────────────────────────────────────────────────
|
||||
|
||||
SCAN_TIMEFRAMES = ["M15", "H1"]
|
||||
SCAN_TIMEFRAMES = ["H1"] # engine pulls M15 + H1 + D1 via confirmations
|
||||
|
||||
# Pairs analyzed by the /scan command. Limited to the most liquid majors
|
||||
# plus gold to keep credits low and signal quality high.
|
||||
SCAN_PAIRS = ["EURUSD=X", "USDJPY=X", "GBPUSD=X", "XAUUSD=X"]
|
||||
|
||||
_TF_MAP = {
|
||||
"M5": Timeframe.M5, "M15": Timeframe.M15,
|
||||
@@ -268,7 +272,7 @@ class ForexTelegramBot:
|
||||
def _build_config(self, tf: str, pairs: List[str]) -> PlatformConfig:
|
||||
cfg = PlatformConfig()
|
||||
cfg.primary_timeframe = _TF_MAP[tf]
|
||||
cfg.confirmation_timeframes = _TF_CONFIRMATIONS.get(tf, [Timeframe.M15, Timeframe.H4])
|
||||
cfg.confirmation_timeframes = _TF_CONFIRMATIONS.get(tf, [Timeframe.M15, Timeframe.D1])
|
||||
cfg.watch_pairs = list(pairs)
|
||||
return cfg
|
||||
|
||||
@@ -418,7 +422,7 @@ class ForexTelegramBot:
|
||||
pass
|
||||
|
||||
try:
|
||||
results_by_tf = await self._analyze_all_tfs(list(MAJOR_PAIRS), progress=progress)
|
||||
results_by_tf = await self._analyze_all_tfs(list(SCAN_PAIRS), progress=progress)
|
||||
now_str = _now_est()
|
||||
|
||||
# Best grade per pair across all TFs
|
||||
|
||||
Reference in New Issue
Block a user