10 Commits
Author SHA1 Message Date
gavindiazandClaude Code 1a7b0111ad fix(startup): build asyncio socketpair over AF_UNIX - unblocks .bat console freeze
The run_bot.bat console path froze for minutes after two log lines with 0 CPU:
asyncio.run() -> ProactorEventLoop.__init__ -> socket.socketpair() -> Python
3.12 _fallback_socketpair() blocks forever in accept() on the loopback TCP
handshake (security software filters 127.0.0.1 in this interactive console +
xau-trader.exe session). Git-bash redirect runs worked 4/4, proving it is
environment, not interpreter.

Windows 10 17063+ supports AF_UNIX sockets, which need no loopback TCP at all.
Monkey-patch socket.socketpair on win32 to self-pair over AF_UNIX via ctypes
(ws2_32; python.org builds don't expose the AF_UNIX constant), falling back to
the stock socketpair if AF_UNIX is unavailable. socket.socket(fileno=N) treats
N as a raw SOCKET handle on Windows, so the raw handles wrap cleanly.

Verified: smoke test raw pair family=1 + full asyncio.run Proactor loop; the
exe boot went from hang to 'Main loop started' in ~10s.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-21 20:58:08 +08:00
Mazonia 058926f6ce feat: add dedicated standby mode allowing full remote start/stop from Telegram 2026-10-04 14:57:26 +00:00
Mazonia c148ab26f3 Fix FinBERT fallback, Gemini rate limit cooldown, RegimeAnalysis attribute, and port handling 2026-09-21 22:45:59 +00:00
Mazonia 12ca311382 fix(logging): enforce UTF-8 stdout encoding to support unicode telemetry on Windows 2026-09-21 11:18:59 +00:00
Mazonia e8b349ccf0 feat: complete AI model training pipeline, MT5 live order execution, and scheduled pending orders
- Implemented scripts/train_ai.py for institutional XGBoost training on MT5 historical candles
- Integrated 46 multi-indicator features, TimeSeriesSplit validation, and feature importance drivers
- Added --train-only and improved --train in main.py
- Enabled MT5 AutoTrading configuration ([Experts] AllowLiveTrading=1)
- Added send_pending_order and cancel_order to MT5Connector (BUY_LIMIT, SELL_LIMIT, BUY_STOP, SELL_STOP)
- Added automatic 12-hour periodic model retraining job in BotScheduler and TradingBot
- Updated Telegram Command Center with MT5 standalone fallback and pending order telemetry
- Placed live test BUY market trade and scheduled BUY_LIMIT order on XAUUSD
2026-09-21 10:13:52 +00:00
Mazonia c76a98117d feat: resilient news sentiment, on-demand regime detection, and institutional glassmorphic dashboard UI 2026-09-21 09:46:45 +00:00
Mazonia ad1b21fe6d Optimize execution latency: zero-delay Telegram long polling, broker filling mode auto-detection, and safe close handlers 2026-09-21 01:34:14 +00:00
Mazonia f5e77a9ca2 Fix Telegram bot polling & command handlers, upgrade news sentiment & Alpha Vantage fetcher, fix bot loop indentation and MT5 non-blocking checks 2026-09-21 01:29:01 +00:00
Mazonia ae9b15f773 Add backtesting engine, unit test suite (18 tests), economic events calendar, scheduler, and alert manager 2026-09-21 01:06:13 +00:00
Mazonia e548b3daa2 Initial commit: XAUUSD AI Trading Bot with MT5, multi-strategy, sentiment analysis, and risk management 2026-09-21 00:57:06 +00:00