Repository navigation
First public release of XTrader, an automated trading platform in Go for MetaTrader 5 symbols. A controller launches and supervises the agents, serves the web dashboard and the Telegram bot, and keeps all the configuration and records in PostgreSQL.
Warning
Automated trading carries a real risk of loss. XTrader is not investment advice, and no strategy, prompt or agent in it has been shown to be profitable. Validate any agent in a backtest and on a demo account first, and read the risk disclaimer.
Note
The application (web dashboard, Telegram bot and messages) is only in Brazilian Portuguese for now. English support is coming soon.
Highlights
- LLM agents (OpenAI or Anthropic), each with its own versioned prompt: decisions with a rationale and confidence, market sentiment, SMC/ICT prompts with pending orders and drawings on the chart, and reanalysis between candle closes.
- Classic strategy agents, no LLM, in four families (trend, momentum, breakout, intraday), with ATR stops and targets.
- XTrader AI, a language model that watches every agent and only acts to reduce risk (stop a bot, block entries, tighten stops, close positions), with a chat on the dashboard.
- Risk controls: daily loss and gain limits (global and per agent) that flatten and block until the next day, broker stop losses kept within the loss left, a least margin for new entries, trading hours with windows, exposure per asset, agents per asset, news guards, breakeven and trailing stop.
- Web dashboard: per-agent charts, decisions, orders, open and closed P/L in the account currency, performance summary from the MT5 deals, backtesting in batches with out-of-sample validation, roles and permissions, and configuration export and import with encrypted secrets.
- MT5 bridge in Python on Wine, deadlines on every order, orders without a response looked up by tag, real accounts only when explicitly allowed.
- Docker Compose deployment (controller, migrator, MT5 terminal and PostgreSQL), with versioned migrations and seeds.
Getting started
See Quick start with Docker and Running locally in the README (Português).
Assets
xtrader-ui.tar.gz: the built web dashboard. A controller withoutui.dirinconfig.ymldownloads it from this release (or the one set inui.version) and checks it againstchecksums.txt. The Docker image already includes the dashboard.checksums.txt: SHA-256 of the assets.
Security
Report vulnerabilities privately as described in SECURITY.md.
Licensed under the MIT license.