3146a632d4
- Register EUR/USD in config (pip 0.0001, EurUsdStrategyConfig) - Create pair_signals/ module: registry + dispatcher with per-pair config factories (xauusd.py, eurusd.py) for easy add/remove - EUR/USD gets forex-tuned regime weights, London+NY session hours, XAU strategy gates disabled - Add defense-in-depth display_name guards in signal_aggregator - Rename telegram_bot.py → testing_telegram_bot.py with separate bot token, both pairs with dedicated button rows - Add EUR/USD to news engine affected pairs map - 9 new tests (146 total, all passing) - Zero changes to engine.py, data_provider.py, main.py, backtest/ Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
24 lines
686 B
Python
24 lines
686 B
Python
"""XAU/USD signal producer config."""
|
|
|
|
from typing import Optional, List
|
|
from config import PlatformConfig, Timeframe
|
|
|
|
_CONFIRMATIONS = {
|
|
Timeframe.M5: [Timeframe.M15, Timeframe.H1],
|
|
Timeframe.M15: [Timeframe.M5, Timeframe.H1],
|
|
Timeframe.H1: [Timeframe.M15, Timeframe.H4],
|
|
Timeframe.H4: [Timeframe.H1, Timeframe.D1],
|
|
}
|
|
|
|
|
|
def make_config(
|
|
primary_tf: Timeframe,
|
|
confirmation_tfs: Optional[List[Timeframe]] = None,
|
|
) -> PlatformConfig:
|
|
config = PlatformConfig()
|
|
config.primary_timeframe = primary_tf
|
|
config.confirmation_timeframes = (
|
|
confirmation_tfs or _CONFIRMATIONS.get(primary_tf, [Timeframe.M15, Timeframe.H4])
|
|
)
|
|
return config
|