Add pair_signals per-pair producer registry
Ported from feature/eurusd-support: PAIR_PRODUCERS registry with make_config() factories per pair. xauusd.make_config is a pure PlatformConfig-defaults wrapper (equality with the inline construction is enforced by test); eurusd.make_config carries the donor branch's regime weights and gates as a pre-realism baseline. Adds 4 registry tests. 154/154 pass. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
"""XAU/USD signal producer config.
|
||||
|
||||
PlatformConfig defaults ARE the tuned XAU/USD configuration, so this
|
||||
factory only sets the timeframes. It must stay equivalent to the inline
|
||||
PlatformConfig(symbol=XAUUSD, ...) construction used by the backtester
|
||||
and Telegram bot (enforced by a test in test_all.py).
|
||||
"""
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user