Add 4-pair candle-boundary auto-scanner (free tier safe)

Expand from 2 to 4 pairs (EUR/USD, USD/JPY, GBP/USD, XAU/USD) with
automatic scanning at M15 and H1 candle close boundaries. Scheduler
staggers H1 by 60s to stay within 8 credits/min; daily budget is
480 of 800 allowed. Cache TTL is now candle-duration-aware so cross-TF
confirmation data is reused without extra API calls. Spread estimate
uses primary-TF data instead of fetching M5 separately.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
harwinder
2026-05-11 15:30:11 -04:00
parent 037dec643e
commit b3e0da7455
4 changed files with 315 additions and 51 deletions
Regular → Executable
+6 -8
View File
@@ -297,14 +297,12 @@ class SignalAggregator:
report.news_sentiment = 0.0
report.news_description = ""
# ── 5. Spread estimate (only meaningful in live mode) ──────
if use_news:
try:
report.spread_estimate = self.data_provider.get_spread_estimate(symbol)
except Exception:
report.spread_estimate = 0.0
else:
# Backtest sets spread externally via BacktestConfig
# ── 5. Spread estimate from primary data (avoids extra API call) ─
try:
report.spread_estimate = float(
(primary_df["High"] - primary_df["Low"]).median()
)
except Exception:
report.spread_estimate = 0.0
# ── 6. Final signal ────────────────────────────────────────