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
+7 -1
View File
@@ -139,7 +139,13 @@ class SignalAggregator:
self._apply_regime_filter_live(report, dfs)
if bt.session_filter:
self._apply_session_filter_live(report)
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