4ffdd6bcb2
New signal_log.py logs each SignalReport to logs/signals.db via a fail-safe hook in SignalAggregator.analyze_pair — the live-only entry point used by the bot, daemon, CLI and dashboard. Backtester calls analyze_from_dataframes directly, so live==backtest parity is preserved (test-locked). Rows carry signal/grade/price/spread, MTF + trade-setup + reasons/warnings JSON, and news-at-scan-time (calendar events + scored headlines JSON via NewsEngine class-level caches). Config: signal_log block (enabled, path; env SIGNAL_LOG_ENABLED/PATH), source tagged per consumer (telegram/oanda_daemon/cli/dashboard). 381 tests pass (24 modules).
57 lines
1.3 KiB
JSON
57 lines
1.3 KiB
JSON
{
|
|
"telegram": {
|
|
"token": "123456789:REPLACE_WITH_YOUR_BOT_TOKEN",
|
|
"chat_id": "REPLACE_WITH_OWNER_CHAT_ID",
|
|
"channel_id": "-100REPLACE_WITH_CHANNEL_ID_OR_EMPTY_STRING",
|
|
"alert_min_quality": "C"
|
|
},
|
|
"data_providers": {
|
|
"active": "oanda",
|
|
"streaming": "tiingo",
|
|
"twelve_data": {
|
|
"api_key": "REPLACE_WITH_YOUR_TWELVE_DATA_API_KEY"
|
|
},
|
|
"oanda": {},
|
|
"tiingo": {
|
|
"api_key": "REPLACE_WITH_YOUR_TIINGO_API_KEY_OR_EMPTY"
|
|
}
|
|
},
|
|
"scanning": {
|
|
"pairs": ["XAU/USD"],
|
|
"timeframes": ["M5", "M15", "H1", "H4"]
|
|
},
|
|
"pairs": {
|
|
"XAU/USD": {
|
|
"blocked_hours_utc": [0, 1, 2, 10, 11, 13, 16, 21]
|
|
}
|
|
},
|
|
"oanda": {
|
|
"account_id": "REPLACE_WITH_ACCOUNT_ID",
|
|
"api_token": "REPLACE_WITH_API_TOKEN",
|
|
"base_url": "https://api-fxpractice.oanda.com",
|
|
"lot_size": 1,
|
|
"quality_gate": "C",
|
|
"max_hold_bars": 300
|
|
},
|
|
"deepseek": {
|
|
"api_key": "REPLACE_WITH_YOUR_DEEPSEEK_API_KEY_OR_EMPTY",
|
|
"model": "deepseek-v4-flash",
|
|
"enabled": true,
|
|
"timeout_seconds": 12,
|
|
"daily_request_cap": 500
|
|
},
|
|
"agent_panel": {
|
|
"enabled": false,
|
|
"telegram": true,
|
|
"dashboard": false,
|
|
"min_quality": "B",
|
|
"max_panels_per_day": 20,
|
|
"reuse_ttl_seconds": 3600
|
|
},
|
|
"signal_log": {
|
|
"enabled": true,
|
|
"path": "logs/signals.db"
|
|
},
|
|
"log_level": "INFO"
|
|
}
|