CHANGES:
- Extended sendValidationNotification interface with confirmationThreshold, maxDrawdown, entryWindowMinutes
- Updated telegram.ts to display actual queued signal thresholds instead of hardcoded values
- Modified smart-validation-queue.ts to pass dynamic threshold values to Telegram
- Messages now show exact thresholds used for each signal (not fixed 0.3%/1.0%/90min)
PURPOSE:
- User requested adaptive display instead of hardcoded values
- Enables future per-signal threshold customization
- Each signal can have different thresholds based on characteristics
EXAMPLE:
Before: 'Will enter if +0.3% confirms' (all signals)
After: 'Will enter if +0.25% confirms' (high ADX signal)
'Will enter if +0.4% confirms' (low ADX signal)
STATUS: Ready for deployment - will show actual threshold per signal
- Enhanced DNS failover monitor on secondary (72.62.39.24)
- Auto-promotes database: pg_ctl promote on failover
- Creates DEMOTED flag on primary via SSH (split-brain protection)
- Telegram notifications with database promotion status
- Startup safety script ready (integration pending)
- 90-second automatic recovery vs 10-30 min manual
- Zero-cost 95% enterprise HA benefit
Status: DEPLOYED and MONITORING (14:52 CET)
Next: Controlled failover test during maintenance
- Problem: Quality 70 signal with strong ADX 29.7 hit TP1 after 30+ minutes
- Analysis: 3/10 blocked signals hit TP1, most moves develop after 15-30 min
- Solution: Extended entryWindowMinutes from 10 → 30 minutes
- Expected impact: Catch more profitable moves like today's signal
- Missed opportunity: $22.10 profit at 10x leverage (0.41% move)
Files changed:
- lib/trading/smart-validation-queue.ts: Line 105 (10 → 30 min)
- lib/notifications/telegram.ts: Updated expiry message
Trade-off: May hold losing signals slightly longer, but -0.4% drawdown
limit provides protection. Data shows most TP1 hits occur after 15-30min.
Status: ✅ DEPLOYED Dec 7, 2025 10:30 CET
Container restarted and verified operational.
Implemented direct Telegram notifications when Position Manager closes positions:
- New helper: lib/notifications/telegram.ts with sendPositionClosedNotification()
- Integrated into Position Manager's executeExit() for all closure types
- Also sends notifications for ghost position cleanups
Notification includes:
- Symbol, direction, entry/exit prices
- P&L amount and percentage
- Position size and hold time
- Exit reason (TP1, TP2, SL, manual, ghost cleanup, etc.)
- MAE/MFE stats (max gain/drawdown during trade)
User request: Receive P&L notifications on position closures via Telegram bot
Previously: Only opening notifications via n8n workflow
Now: All closures (TP/SL/manual/ghost) send notifications directly