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:
Regular → Executable
+6
-8
@@ -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 ────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user