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:
harwinder
2026-05-13 17:31:46 -04:00
parent 2deea1ed7f
commit 4d3f05e2ba
+6
View File
@@ -139,6 +139,12 @@ class SignalAggregator:
self._apply_regime_filter_live(report, dfs) self._apply_regime_filter_live(report, dfs)
if bt.session_filter: 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) self._apply_session_filter_live(report)
return report return report