The Alchemist is an AI Forex Experimentation & Trading Platform that enables iterative development of profitable DRL (Deep Reinforcement Learning) trading models. The platform provides a complete workflow from data collection → feature engineering → model training → backtesting → paper trading → live deployment.
The Alchemist provides:
- Extensible Data Sources: Auto-discovery system for data providers with feature catalog
- Experiment Builder: Create and configure experiments through the dashboard UI
- Dual Training Modes: Live training (real-time data) or historical backtesting
- Hyperparameter Tuning: Manual configuration or automated Optuna search
- Model Lifecycle: Clear progression from Training → Paper Trading → Live Trading
- Safety First: Kill switch, circuit breakers, and order management built-in
- Performance Tracking: Real-time metrics, equity curves, and trade history
- React Dashboard: Complete experimentation UI for managing experiments
┌─────────────────┐
│ React Dashboard│ (Port 3000)
└────────┬────────┘
│
┌────────▼────────┐
│ FastAPI Service│ (Port 8000)
└────────┬────────┘
│
┌────────▼────────┐
│ Trading Server │ (Port 1234)
└────────┬────────┘
│
┌────┴────┐
│ MT5 │
└─────────┘
-
Data Collection & Features
- Real-time tick data from MT5
- Technical indicators (RSI, MACD, Bollinger Bands, etc.)
- Auto-discovery of features from registered providers
- Feature catalog with metadata
-
Experiment Management
- Create experiments with feature selection
- Configure hyperparameters manually or via Optuna
- Track experiments with MLflow integration
- Model registry with promotion workflow
-
Trading Operations
- Direct connection to MT5 Expert Advisors
- Order management with idempotency
- Position reconciliation
- Real-time trade execution
-
Safety Infrastructure ✅
- Kill Switch: Multiple trigger mechanisms (file, env, network, signal, API)
- Circuit Breaker: Automatic halt on excessive losses
- Order Management System: Complete order lifecycle tracking
-
Performance Tracking ✅
- Trade logging and P&L calculation
- Equity curve tracking
- Performance metrics (Sharpe ratio, win rate, drawdown, etc.)
- Portfolio-level aggregation
-
MLOps ✅
- MLflow experiment tracking
- Model versioning and promotion
- Paper trading validation
- Model lifecycle management
- Docker and Docker Compose
- Python 3.11
- MetaTrader 5 platform with a valid paper or live account
-
Create a
.envfile in the project root with the following variables:SERVER_IP=0.0.0.0 SERVER_PORT=1234 DB_HOST=mariadb DB_PORT=3306 DB_NAME=db_forex DB_USER=forex_user DB_PASSWORD=forex_password MYFXBOOK_EMAIL=your_email@example.com MYFXBOOK_PASSWORD=your_password URL_MYFXBOOK=https://www.myfxbook.com/
-
Run database migrations (if not already done):
# Option 1: Use migration runner (recommended) python scripts/run-migrations.py # Option 2: Run scripts manually mysql -u root -p db_forex < database/scripts/01_create.sql mysql -u root -p db_forex < database/scripts/02_procedures.sql mysql -u root -p db_forex < database/scripts/06_safety_infrastructure.sql
-
Start the Docker environment:
docker compose up -d --build
-
Verify the server is running:
docker logs server
You should see:
Server socket bind to 0.0.0.0:1234
-
Install MetaTrader 5 from the official website
-
Find your Docker host IP address:
- On Windows/Mac: Use
localhostor127.0.0.1if running Docker Desktop - On Linux: Use your machine's IP address or
localhost - If using Docker on a remote server, use that server's IP address
- On Windows/Mac: Use
-
Configure Expert Advisors:
- Navigate to: Tools -> Options -> Expert Advisors
- Enable "Allow WebRequest for listed URL"
- Add your endpoint:
http://<your-ip>:1234(if needed for web requests)
-
Load the Expert Advisors:
- Copy the EAs from
src/mql5_code/EAs/to your MT5Expertsfolder - In the EA inputs, set:
ip: Your Docker host IP (e.g.,localhostor your machine's IP)port:1234(must match SERVER_PORT in .env)
- Copy the EAs from
-
Attach EAs to charts:
mt5_tick_streamer.mq5: Attach to any chart for the symbol you want to streammt5_trading_operation.mq5: Attach to enable trading operations
- API Reference - Complete API documentation with examples
- User Guide - Getting started and using the platform
- Developer Guide - Adding data sources and extending features
- Deployment Guide - Setup, configuration, and troubleshooting
# All tests
pytest tests/
# Unit tests
pytest tests/unit/
# Integration tests
pytest tests/integration/
# API tests
pytest tests/api/
# With coverage
pytest tests/ --cov=src/mt5-python_server/src --cov-report=html- Unit tests: Core components and utilities
- Integration tests: Component interactions and workflows
- API tests: All REST endpoints and WebSocket channels
- E2E tests: Complete user workflows
- Performance tests: Benchmarks and optimization validation
-
Clone and Configure
git clone <repository-url> cd alchemist-platform cp .env.example .env # Edit .env with your settings
-
Start Services
docker compose up -d
-
Access Dashboard
- Open http://localhost:3000
- Create your first experiment!
See Deployment Guide for detailed setup instructions.
Proprietary software of Alchemist Capital
Unauthorized use or distribution is prohibited
© 2026, Alchemist Capital - All rights reserved