Fix live session filter overriding XAU strategy signals
The general session filter ran after analyze_from_dataframes() and wiped out XAU oversold bounce signals at most hours. Now skips the session filter when the XAU strategy has already fired — the strategy has its own backtested hour filter.
This commit is contained in:
@@ -139,6 +139,12 @@ class SignalAggregator:
|
||||
self._apply_regime_filter_live(report, dfs)
|
||||
|
||||
if bt.session_filter:
|
||||
xau_active = (
|
||||
report.display_name == "XAU/USD"
|
||||
and self.config.xau_strategy.enabled
|
||||
and any("XAU STRATEGY" in r for r in report.bullish_reasons)
|
||||
)
|
||||
if not xau_active:
|
||||
self._apply_session_filter_live(report)
|
||||
|
||||
return report
|
||||
|
||||
Reference in New Issue
Block a user