case · 009
AI-augmented MT5 scalping bot.
An autonomous MT5 bot that runs technical-indicator analysis (RSI, MACD, Bollinger Bands, ATR) and cloud-LLM reasoning in parallel, then executes trades with hard daily-loss and drawdown limits behind a WebSocket operator dashboard. Every decision logged with its AI reasoning and indicator state.
fig. 0.1
Cover image · bot + dashboard diagram
Manually trading scalps during off-hours meant missing the windows that mattered most. The goal was to keep the operator in the loop — every trade decision logged with its AI reasoning and indicator state — while letting the bot act on windows the operator wasn't watching.
Our team built a Windows-friendly bot that connects to MT5 via the official Python API, streams candles, computes indicators, asks the configured LLM for a directional view, and routes a trade request back into MT5 with hard risk gates in front of every order placement.
cloud-LLM providers supported (Claude, OpenAI, MiniMax, Groq)
dashboard tick latency (WebSocket)
technical indicators in the signal stack
of orders logged with AI reasoning + indicator state
Risk controls are not advisory — they're enforceable limits checked at order entry. Configurable daily-loss caps halt new orders for the rest of the session. Drawdown protection halts trading once a configurable percentage of starting equity is reached. Position sizing is a pure function of account equity, indicator confidence, and LLM-side confidence — no over-ride path that would let the AI argue itself into a 5% position when the rule says 1%.
The bot falls back to indicator-only mode if no LLM API key is configured: trades still run on RSI/MACD/Bollinger/ATR confluence, but without the reasoning layer the dashboard shows "indicators only" for that session. Operators get a live dashboard (engine status, today's trade statistics, real-time market analysis per symbol, open positions with live P&L, recent AI decisions with reasoning, full trade history) so they can pull the kill switch or change risk params in seconds.
/ stack
- n/a — MT5 connects to broker server (off-chain trading)
- Python 3.8+
- MetaTrader5 Python API
- websockets
- asyncio
- RSI/MACD/Bollinger Bands/ATR indicator stack
- multi-provider LLM client
- YAML-driven config
next case study
YouTube Shorts automation, local-only..
A local-only YouTube Shorts automation system: Next.js as the sole backend, local FFmpeg for rendering, Prisma + PostgreSQL for persistence, free-tier AI for scripts/images/voice, and a strict human-review gate at every pipeline stage. Power tool for one creator on one machine, no cloud bill.
/ start a project