Pro tier upgrade: quant rearchitect + WebSocket level-breach monitor

- Restore XAU/USD (Pro plan), drop USD/CAD, raise rate limit to 55/min
- Reduce signal engine to 4 uncorrelated pillars (EMA, RSI, BB, Candlestick)
  with regime-adaptive weights (trending boosts EMA, ranging boosts RSI+BB)
- Add structure-based S/R (swing highs/lows) for trade setup targeting
- Fix confidence death spiral: all adjustments now additive, not multiplicative
- Dynamic R:R trade setup: SL behind swing level, TP at next structure level,
  reject if R:R < 1.5
- Fix news engine for all 4 pairs (was hardcoded to USDJPY)
- Add WebSocket monitor: streams live ticks, triggers M15 scan on level breach
  with 5-min cooldown per pair — catches breakouts between candle boundaries
- Add correlation filter (EUR/USD+GBP/USD, XAU/USD+USD/JPY exposure warnings)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
harwinder
2026-05-11 16:33:23 -04:00
parent a15dc40050
commit dc9c76a716
8 changed files with 435 additions and 196 deletions
+4 -2
View File
@@ -49,7 +49,7 @@ class ForexDataProvider:
Timeframe.D1: 86400, Timeframe.W1: 604800,
}
RATE_LIMIT = 8
RATE_LIMIT = 55
RATE_WINDOW = 60.0
def __init__(self, config: PlatformConfig):
@@ -67,6 +67,8 @@ class ForexDataProvider:
@staticmethod
def _to_td_symbol(symbol: str) -> str:
if "/" in symbol:
return symbol
clean = symbol.replace("=X", "")
return f"{clean[:3]}/{clean[3:]}"
@@ -132,7 +134,7 @@ class ForexDataProvider:
# ── Private ────────────────────────────────────────────────────
def _throttle(self, credits: int = 1) -> None:
"""Free tier: 8 credits / minute. Block until budget allows."""
"""Pro tier: 55 credits / minute. Block until budget allows."""
while True:
now = time.time()
while self._request_times and now - self._request_times[0] >= self.RATE_WINDOW: