23 Commits
Author SHA1 Message Date
gavindiazandClaude Code 7e50a0fef6 feat(llm): provider-agnostic OpenAI-compatible client; FinBERT warm-up off the event loop
Replace the Google Gemini lock-in with a unified chat client usable with any
OpenAI-compatible /v1 endpoint (OpenAI, OpenRouter, DeepSeek, Moonshot, Qwen,
Ollama, Gemini-via-compat...). Switch provider purely via AI_BASE_URL/AI_MODEL.

- ai/llm_client.py (new): lazy openai SDK, per-candidate 429/503/timeout
  failover across AI_MODEL_FAILOVER, robust JSON extraction, reasoning-budget
  retry, image analysis via base64 data URI, singleton get_llm_client()
- settings.py: GeminiSettings -> LLMSettings (api_key/base_url/model/failover/
  vision_model), keeps GEMINI_API_KEY fallback so existing .env keeps working
- news_analyzer.py: analyze_with_gemini -> analyze_with_llm (same output keys);
  FinBERT now loads in a daemon warm-up thread with lexicon fallback - the
  transformers first import was blocking the asyncio main loop 15-45s
  (importlib.metadata full package scan); HF_ENDPOINT hf-mirror setdefault
- telegram_bot.py: news digest + AI-vision chart analysis via the LLM client
- requirements: google-genai -> openai>=1.0; docs/.env.example/README updated
  for the new provider-agnostic setup; dashboard meta updated

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-21 20:56:52 +08:00
Mazonia 6ee739aea8 feat: add Telegram Mini App (TWA), chart vision scanner & voice command integration for XAUUSD trader bot 2026-10-06 15:27:23 +00:00
Mazonia 78a7340f6e feat(startup): enable hands-free PC boot standby and Telegram remote control 2026-10-04 15:14:21 +00:00
Mazonia 79556b806e feat: add remote Telegram start/stop commands and 24/7 background runner scripts 2026-10-04 14:45:15 +00:00
Mazonia bfef04b6de Enhance Telegram Bot with live confluence signals, interactive risk/lot menu, robust HTML entity fallback, and 2025-2026 gold catalysts 2026-10-01 06:11:14 +00:00
Mazonia 6ad2d46851 fix(trades): resolve datetime offset naive/aware bug and restore /trades command and real-time realized PnL 2026-09-25 14:22:33 +00:00
Mazonia 284ef3ec62 feat(telegram): register native menu commands, add mode switching to main menu and help cheatsheet 2026-09-25 01:11:23 +00:00
Mazonia 3bb4c82e20 Implement dynamic Mode Switching (Safe/Moderate/Aggressive), Fix MT5 Zero-Margin Trap, decouple Confluence threshold, and add comprehensive mode-switching tests with false-pretense protection 2026-09-25 00:58:45 +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 6f5636de23 feat(ai): integrate neural network book enhancements: temporal self-attention scorer, candlestick physics & stationarity features, and dynamic regime-adaptive threshold 2026-09-21 14:24:18 +00:00
Mazonia 219b72578c fix(news): implement persistent multi-layer deduplication, word-boundary keyword matching, and alert suppression 2026-09-21 13:10:36 +00:00
Mazonia 312b78201b fix(telegram): render scheduled pending orders, add cancel button, add Self-Learning button to main keyboard, and register native menu commands via set_my_commands 2026-09-21 10:27:48 +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 a7a2b93985 feat: implement autonomous self-learning and mistake adaptation engine
- Implemented TradeLearner with post-mortem mistake diagnostics and defensive rule formulation
- Added Mistake Memory Guard to screen prospective signals against past loss patterns and traps
- Dynamic Multi-Armed Bandit strategy multipliers (Scalping, Day, Swing) and adaptive confluence weighting
- Integrated with TradeExecutor, Bot position synchronization, and SignalAggregator
- Real-time Self-Learning HUD in modern glassmorphic web dashboard (/api/learning)
- Added /learning command and interactive callback button to Telegram Command Center
- Added TradeLesson and AdaptiveWeight persistence models in SQLite WAL database
- Updated documentation and README
2026-09-21 09:53:45 +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 4ece88393f fix(telegram): resolve closeall confirmation freeze, non-blocking MT5 reconnect, and handle Message is not modified 2026-09-21 02:17:48 +00:00
Mazonia abe5b0298c security: complete cross-platform communication security and technical audit 2026-09-21 02:05:50 +00:00
Mazonia be48ea97b4 Integrate economic event cooldowns, background scheduler, MT5 deal history syncing, trailing stop memory cleanup, and non-blocking dashboard API 2026-09-21 01:56:00 +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 b220e0f499 Upgrade Telegram Bot to 2-way interactive Command Center with inline buttons, remote trade control, and quick launcher batch scripts 2026-09-21 01:13:49 +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