mirror of
https://github.com/chrisnov-it/quantumbotx.git
synced 2026-07-27 18:57:47 +00:00
Consolidate MT5 README documentation
This commit is contained in:
@@ -1,397 +1,216 @@
|
||||
# 🤖 QuantumBotX — AI-Powered Modular Trading Bot for MT5
|
||||
# QuantumBotX
|
||||
|
||||
!MIT License
|
||||
!Python Version
|
||||
!Framework
|
||||
!Made with Love
|
||||
QuantumBotX is a Windows-first trading bot and backtesting platform for
|
||||
MetaTrader 5. The `main` branch is intentionally kept focused on MT5 so users
|
||||
can install, test, and run the current app without confusion from experimental
|
||||
cross-platform work.
|
||||
|
||||
Welcome to **QuantumBotX**, your personal, modular, and smart trading assistant built with Python and MetaTrader5 (MT5).
|
||||
Designed to be elegant, powerful, and flexible — whether you're a scalper, swing trader, or a strategy researcher.
|
||||
Use this project for education, research, demo trading, and strategy validation.
|
||||
Always test on a demo account before considering any live trading.
|
||||
|
||||
---
|
||||
## Current Scope
|
||||
|
||||
## ⚠️ Platform Support Notice
|
||||
- Primary runtime: MetaTrader 5 terminal on Windows.
|
||||
- Backend: Python and Flask.
|
||||
- Database: SQLite.
|
||||
- Frontend: Flask templates, TailwindCSS, and Chart.js.
|
||||
- Strategy tools: local technical indicator compatibility layer plus pandas.
|
||||
- Development baseline: Python 3.12 is supported.
|
||||
|
||||
### **Primary Platform: Windows** 🪟
|
||||
This version of QuantumBotX is **optimized for Windows** and requires MetaTrader 5 terminal to be installed locally. It's designed for learning algorithmic trading on your personal computer.
|
||||
Experimental cross-platform work belongs on dedicated development branches, not
|
||||
on `main`.
|
||||
|
||||
### **Alternative Platforms** 🔄
|
||||
- **Linux**: Can attempt using Wine (experimental - see Linux Setup guide below)
|
||||
- **macOS**: Not officially supported (requires Wine or Windows VM)
|
||||
- **Cloud/VPS**: Not compatible (requires local MT5 terminal)
|
||||
## Features
|
||||
|
||||
> 💡 **Pro Tip**: For cloud deployment and multi-platform support, check out our upcoming **QuantumBotX API** version!
|
||||
- MT5 account connection and symbol validation.
|
||||
- Live bot management for MT5 instruments.
|
||||
- Strategy parameter forms and beginner-friendly defaults.
|
||||
- Historical data download from MT5.
|
||||
- Realistic backtesting with ATR-based risk management, spread/slippage
|
||||
modeling, equity curves, drawdown, win rate, and trade history.
|
||||
- Multiple built-in strategies for forex, gold, indices, and MT5-supported
|
||||
crypto CFD symbols.
|
||||
- Dashboard and portfolio views for monitoring bot status and results.
|
||||
- Indonesian AI mentor features for trade journaling and learning support.
|
||||
- Holiday and session-aware helpers for safer trading routines.
|
||||
|
||||
---
|
||||
## Platform Support
|
||||
|
||||
## 🚀 Features
|
||||
### Supported
|
||||
|
||||
### 🎯 **Core Trading Engine**
|
||||
- ✅ **Modular Strategy System**: 16+ professional trading strategies with plug-and-play architecture
|
||||
- ✅ **ATR-Based Risk Management**: Dynamic position sizing that adapts to market volatility with realistic backtesting
|
||||
- ✅ **Advanced Backtesting Engine**: Realistic spread/slippage modeling with instrument-specific configurations
|
||||
- ✅ **Multi-Broker Support**: Automatic symbol migration (XM Global, MetaTrader, Exness, Alpari, FBS)
|
||||
- ✅ **Real-Time Trading**: 4 concurrent bots with live MT5 integration and smart symbol validation
|
||||
- ✅ **Emergency Protection**: XAUUSD safeguards with auto-halting and account blowout prevention
|
||||
- ✅ **Strategy Switcher**: AI-powered automatic strategy switching based on market conditions
|
||||
- ✅ **Market Condition Detector**: Real-time market regime analysis (trending/ranging/volatile)
|
||||
- Windows 10/11, 64-bit recommended.
|
||||
- MetaTrader 5 terminal installed locally.
|
||||
- Python 3.12 recommended.
|
||||
|
||||
### 🧠 **AI-Powered Mentorship**
|
||||
- ✅ **Indonesian AI Mentor**: Personal trading mentor dengan bahasa Indonesia, analisis emosi vs performa
|
||||
- ✅ **Cultural Intelligence**: Supportif seperti mentor manusia dengan konteks budaya Indonesia
|
||||
- ✅ **Personalized Guidance**: Analisis pola trading, evaluasi risiko, dan rekomendasi strategi
|
||||
- ✅ **Motivational Support**: Pesan motivasi yang contextual berdasarkan journey dan performa
|
||||
- ✅ **Database Integration**: Log semua trade untuk analisis AI dan feedback yang lebih baik
|
||||
### Experimental
|
||||
|
||||
### 🎓 **Educational Framework**
|
||||
- ✅ **Beginner-Friendly System**: Progressive learning path from Week 1 to Month 3
|
||||
- ✅ **Strategy Difficulty Ratings**: 2-12 complexity scale with automatic recommendations
|
||||
- ✅ **Parameter Education**: Every setting explained in plain English
|
||||
- ✅ **Market-Specific Guidance**: Different strategies for FOREX vs GOLD vs CRYPTO vs INDICES
|
||||
- ✅ **Built-in Mentorship**: Strategy selector guides users by experience level
|
||||
- ✅ **Database Migration System**: Seamless version upgrades with `migrate_db.py`
|
||||
- Linux with Wine may work for MT5, but it is not the primary support target.
|
||||
- macOS requires a Windows VM, CrossOver, Wine, or a separate Windows machine.
|
||||
|
||||
### 📊 **Advanced Analytics**
|
||||
- ✅ **Comprehensive Backtester**: Historical testing with interactive Chart.js visualizations
|
||||
- ✅ **Performance Tracking**: Detailed trade logs, equity curves, and profit analysis
|
||||
- ✅ **Real-Time Dashboard**: Live data visualization and bot monitoring
|
||||
- ✅ **Backtest History**: Complete archive of all strategy tests with parameters
|
||||
- ✅ **Risk Analytics**: Drawdown analysis and portfolio performance metrics
|
||||
### Not Supported On `main`
|
||||
|
||||
### 🌐 **Multi-Asset Trading**
|
||||
- ✅ **Forex Optimization**: EURUSD, GBPUSD, USDJPY with trend-following strategies
|
||||
- ✅ **Gold Trading Protection**: Ultra-conservative XAUUSD position sizing with ATR limits
|
||||
- ✅ **Crypto Excellence**: Bitcoin/Ethereum bots with 24/7 weekend trading mode
|
||||
- ✅ **Indonesian Market Ready**: XM Indonesia integration with IDR pairs support
|
||||
- ✅ **Cross-Platform Foundation**: cTrader, Interactive Brokers architecture
|
||||
- Cloud/VPS without a local MT5 terminal session.
|
||||
- Native non-MT5 broker execution.
|
||||
- Cross-platform broker runtimes.
|
||||
|
||||
### 🎉 **Culturally-Aware Features**
|
||||
- ✅ **Automatic Holiday Detection**: Christmas and Ramadan modes activate automatically
|
||||
- ✅ **Ramadan Trading Mode**: Respects prayer times with automatic trading pauses
|
||||
- ✅ **Cultural Sensitivity**: UI themes and greetings for both Christian and Muslim traders
|
||||
- ✅ **Islamic Finance Features**: Zakat calculator and charity tracker during Ramadan
|
||||
- ✅ **Seasonal Adjustments**: Risk management adapts to holiday market conditions
|
||||
## Quick Start
|
||||
|
||||
### 🛡️ **Professional Safety**
|
||||
- ✅ **Automated Risk Control**: 1% max risk per trade with emergency brake system
|
||||
- ✅ **Volatility Protection**: ATR-based position scaling during market turbulence
|
||||
- ✅ **Beginner Safeguards**: Parameter validation prevents dangerous settings
|
||||
- ✅ **Account Preservation**: Conservative defaults protect capital while learning
|
||||
- ✅ **Windows Optimized**: Clean logging and professional error handling
|
||||
1. Clone the repository:
|
||||
|
||||
---
|
||||
```bash
|
||||
git clone https://github.com/rebarakaz/quantumbotx.git
|
||||
cd quantumbotx
|
||||
```
|
||||
|
||||
## 🚀 Development & Testing Framework
|
||||
2. Create and activate a virtual environment:
|
||||
|
||||
### 🧪 **Testing Infrastructure**
|
||||
- ✅ **30+ Test Scripts**: Comprehensive testing suite in dedicated `testing/` directory
|
||||
- ✅ **Multi-Broker Testing**: XM Global, Exness, Alpari compatibility validation
|
||||
- ✅ **Strategy Validation**: Individual strategy testing and parameter optimization
|
||||
- ✅ **ATR Education Testing**: Interactive examples and beginner tutorials
|
||||
- ✅ **Crypto Integration Tests**: Bitcoin/Ethereum weekend mode validation
|
||||
- ✅ **Indonesian Market Tests**: XM Indonesia and IDR pairs testing
|
||||
- ✅ **Risk Management Tests**: XAUUSD protection and ATR-based sizing validation
|
||||
```bash
|
||||
python -m venv venv
|
||||
.\venv\Scripts\activate
|
||||
```
|
||||
|
||||
### 🔧 **Development Tools**
|
||||
- ✅ **Symbol Migration Tools**: Automatic broker symbol discovery and mapping
|
||||
- ✅ **Bot State Management**: Debug and fix tools for bot recovery
|
||||
- ✅ **Performance Analysis**: Backtesting debugging and optimization tools
|
||||
- ✅ **Market Diagnostics**: Real-time market condition analysis
|
||||
- ✅ **Integration Demos**: Complete workflow demonstrations
|
||||
3. Install dependencies:
|
||||
|
||||
> **Note**: All testing scripts are excluded from git repository for clean production deployment
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
---
|
||||
4. Install and open MetaTrader 5.
|
||||
|
||||
## 📦 Tech Stack
|
||||
Log in to a demo account first and keep the terminal running while using
|
||||
QuantumBotX.
|
||||
|
||||
- `Python 3.10+`
|
||||
- `Flask` & `TailwindCSS`
|
||||
- `MetaTrader5` Python Integration
|
||||
- `pandas` & `pandas-ta` for data analysis
|
||||
- `Chart.js` for data visualization
|
||||
- `SQLite` for database
|
||||
5. Configure `.env`:
|
||||
|
||||
---
|
||||
```bash
|
||||
copy .env.example .env
|
||||
```
|
||||
|
||||
## 🧠 Strategy Collection
|
||||
Then fill in:
|
||||
|
||||
### 🎓 **Beginner Strategies (Complexity 2-3/10)**
|
||||
| Strategy | Description | Best For | Learning Focus |
|
||||
|---|---|---|---|
|
||||
| `MA Crossover` | Classic Golden/Death Cross with beginner-safe defaults | EURUSD, trending markets | Understanding trend following |
|
||||
| `RSI Crossover` | Momentum analysis with RSI and moving average confirmation | FOREX pairs, momentum learning | Momentum concepts and timing |
|
||||
| `Turtle Breakout` | Price breakout above/below recent highs/lows | Gold, trending markets | Support/resistance levels |
|
||||
```env
|
||||
MT5_LOGIN=your_mt5_login
|
||||
MT5_PASSWORD=your_mt5_password
|
||||
MT5_SERVER=your_broker_server
|
||||
SECRET_KEY=change_me
|
||||
DB_NAME=bots.db
|
||||
```
|
||||
|
||||
### 📚 **Intermediate Strategies (Complexity 4-7/10)**
|
||||
| Strategy | Description | Best For | Advanced Features |
|
||||
|---|---|---|---|
|
||||
| `Bollinger Reversion` | Mean reversion when price touches Bollinger Bands | Ranging FOREX markets | Market cycle understanding |
|
||||
| `Ichimoku Cloud` | Japanese technical analysis with cloud confirmation | FOREX, comprehensive analysis | Multi-indicator synthesis |
|
||||
| `Pulse Sync` | Multi-timeframe MACD + Stochastic confirmation | FOREX, Gold | Multiple timeframe analysis |
|
||||
| `Bollinger Squeeze` | Volatility compression breakout detection | Gold, volatile markets | Volatility analysis |
|
||||
6. Start the app:
|
||||
|
||||
### 🎆 **Advanced Strategies (Complexity 5-8/10)**
|
||||
| Strategy | Description | Best For | Professional Features |
|
||||
|---|---|---|---|
|
||||
| `Quantum Velocity` | EMA 200 + Bollinger Squeeze breakout system | Gold, crypto | Advanced volatility filtering |
|
||||
| `Mercy Edge` | AI-enhanced multi-timeframe with trend validation | FOREX, Gold | Professional-grade confirmation |
|
||||
| `QuantumBotX Hybrid` | ADX-adaptive strategy switching (trending vs ranging) | All markets | Market regime detection |
|
||||
| `Dynamic Breakout` | Adaptive breakout detection with volatility scaling | Gold, crypto | Dynamic parameter adjustment |
|
||||
```bash
|
||||
python run.py
|
||||
```
|
||||
|
||||
### 🚀 **Expert Strategies (Complexity 10-12/10)**
|
||||
| Strategy | Description | Best For | Specialized Features |
|
||||
|---|---|---|---|
|
||||
| `QuantumBotX Crypto` | Bitcoin/Ethereum optimized with 24/7 weekend mode | BTCUSD, ETHUSD | Crypto volatility management |
|
||||
## Optional MT5 Helper
|
||||
|
||||
### 📊 **Index Strategies (NEW!)**
|
||||
- ✅ **Index Momentum**: Stock index momentum with gap detection for US500, US30
|
||||
- ✅ **Index Breakout Pro**: Professional index breakout with institutional analysis
|
||||
- ✅ **Multi-Timeframe Analysis**: Daily, weekly, and monthly perspective for indices
|
||||
- ✅ **Risk-Adjusted Position Sizing**: Conservative approach for volatile index markets
|
||||
The project includes an MT5 setup helper:
|
||||
|
||||
### 🎯 **Market-Specific Optimization**
|
||||
- **FOREX Trading**: MA Crossover, Ichimoku Cloud, Bollinger Reversion
|
||||
- **Gold (XAUUSD)**: Quantum Velocity, Turtle Breakout, Dynamic Breakout
|
||||
- **Cryptocurrency**: QuantumBotX Crypto, RSI Crossover with crypto detection
|
||||
- **Stock Indices**: Index Momentum, Index Breakout Pro (US30, US100, US500, DE30, etc.)
|
||||
- **Multi-Asset**: QuantumBotX Hybrid adapts automatically to any market
|
||||
|
||||
---
|
||||
|
||||
## 📈 Roadmap
|
||||
|
||||
### ✅ **v2.0 - Professional Foundation (COMPLETED)**
|
||||
- ✅ **ATR-Based Risk Management**: Revolutionary position sizing system
|
||||
- ✅ **Multi-Broker Symbol Migration**: Automatic XM/Exness/Alpari compatibility
|
||||
- ✅ **Educational Framework**: Progressive learning system for beginners
|
||||
- ✅ **Gold Protection System**: Ultra-safe XAUUSD trading with automatic limits
|
||||
- ✅ **Crypto Weekend Mode**: 24/7 Bitcoin/Ethereum trading capabilities
|
||||
- ✅ **Strategy Complexity Ratings**: 2-12 scale with automatic recommendations
|
||||
- ✅ **Windows Optimization**: Clean logging and professional error handling
|
||||
- ✅ **Comprehensive Backtesting**: Interactive Chart.js visualizations
|
||||
- ✅ **Indonesian Market Support**: XM Indonesia integration with IDR pairs
|
||||
- ✅ **Culturally-Aware Trading**: Automatic holiday detection for Christmas and Ramadan
|
||||
|
||||
### 🚧 **v2.1 - Intelligence Enhancement (IN DEVELOPMENT)**
|
||||
- [ ] **Advanced Strategy**: `MACD_STOCH_FILTER` for more precise, filtered entries
|
||||
- [ ] **Telegram Notifications**: Real-time alerts for trades, errors, and performance
|
||||
- [ ] **Portfolio Analytics**: Advanced performance metrics and drawdown analysis
|
||||
- [ ] **Smart Parameter Optimization**: AI-assisted strategy parameter tuning
|
||||
- [ ] **Market Regime Detection**: Automatic strategy switching based on market conditions
|
||||
- [ ] **Risk Analytics Dashboard**: Real-time risk exposure and correlation analysis
|
||||
|
||||
### 🚀 **v3.0 - AI Revolution (FUTURE VISION)**
|
||||
- [ ] **Machine Learning Integration**: AI-powered strategy optimization
|
||||
- [ ] **Sentiment Analysis**: News and social media sentiment trading signals
|
||||
- [ ] **Multi-Broker Arbitrage**: Cross-broker price difference exploitation
|
||||
- [ ] **Advanced Portfolio Management**: Multi-strategy portfolio optimization
|
||||
- [ ] **Custom Strategy Builder**: Visual drag-and-drop strategy creation
|
||||
- [ ] **Community Strategy Marketplace**: Share and download user strategies
|
||||
|
||||
---
|
||||
|
||||
## 🔐 Environment Variables (`.env`)
|
||||
|
||||
Rename `.env.example` to `.env`, and fill in the following:
|
||||
|
||||
```env
|
||||
MT5_LOGIN="your_mt5_login"
|
||||
MT5_PASSWORD="your_password"
|
||||
MT5_SERVER="your_broker_server"
|
||||
SECRET_KEY="any_flask_secret_key"
|
||||
DB_NAME=bots.db
|
||||
```
|
||||
|
||||
> **Note:** The API keys for Alpha Vantage, CMC, and Finnhub are deprecated and can be ignored.
|
||||
|
||||
---
|
||||
|
||||
## 🧪 Local Setup (Dev Mode)
|
||||
|
||||
1. **Clone the repository:**
|
||||
```bash
|
||||
git clone https://github.com/rebarakaz/quantumbotx.git
|
||||
cd quantumbotx
|
||||
```
|
||||
2. **Set up Python virtual environment:**
|
||||
```bash
|
||||
python -m venv venv
|
||||
# On Windows
|
||||
.\venv\Scripts\activate
|
||||
# On macOS/Linux
|
||||
source venv/bin/activate
|
||||
```
|
||||
3. **Install dependencies:**
|
||||
```bash
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
4. **Configure your environment:**
|
||||
```bash
|
||||
cp .env.example .env
|
||||
# Now, edit the .env file with your MT5 credentials
|
||||
```
|
||||
5. **Run the application:**
|
||||
```bash
|
||||
python run.py
|
||||
```
|
||||
6. **Development & Testing (Optional):**
|
||||
```bash
|
||||
# Explore 30+ test scripts in testing/ directory
|
||||
# Test specific strategies, brokers, or market conditions
|
||||
# All testing scripts are automatically excluded from git
|
||||
```
|
||||
|
||||
> **Important:** You must have the MetaTrader 5 terminal installed and running on the same machine.
|
||||
> **Linux Users:** MetaTrader 5 is Windows-only, but you can run it on Linux using Wine. See the Linux Setup section below for detailed instructions.
|
||||
> **For Developers:** Check the `testing/` directory for comprehensive test scripts and development tools.
|
||||
|
||||
---
|
||||
|
||||
## 🐧 Linux Setup (Wine Configuration)
|
||||
|
||||
Since MetaTrader 5 is Windows-only software, Linux users need to use Wine to run MT5. Here's a step-by-step guide:
|
||||
|
||||
### 1. Install Wine
|
||||
```bash
|
||||
# Ubuntu/Debian
|
||||
sudo apt update
|
||||
sudo apt install wine winetricks
|
||||
|
||||
# Fedora/CentOS/RHEL
|
||||
sudo dnf install wine winetricks
|
||||
|
||||
# Arch Linux
|
||||
sudo pacman -S wine winetricks
|
||||
python install_mt5_integration.py
|
||||
```
|
||||
|
||||
### 2. Configure Wine Environment
|
||||
Use it to check Python compatibility, MetaTrader5 package availability, MT5
|
||||
terminal installation, and basic environment setup.
|
||||
|
||||
For more detail, see `MT5_SETUP_GUIDE.md`.
|
||||
|
||||
## Data And Backtesting
|
||||
|
||||
QuantumBotX can download historical OHLCV data through MT5 and use it for
|
||||
strategy testing. Typical workflows:
|
||||
|
||||
- Use the web interface on the backtesting page.
|
||||
- Run `python lab/download_data.py`.
|
||||
- Upload CSV files through the backtesting UI.
|
||||
|
||||
Supported markets depend on the connected MT5 broker. Common examples include:
|
||||
|
||||
- Forex pairs such as EURUSD, GBPUSD, USDJPY.
|
||||
- Gold symbols such as XAUUSD and broker-specific variants.
|
||||
- Indices such as US30, US100, US500, DE30, UK100, when available.
|
||||
- Crypto CFD symbols such as BTCUSD or ETHUSD, when available through MT5.
|
||||
|
||||
## Strategy Collection
|
||||
|
||||
Beginner-friendly:
|
||||
|
||||
- MA Crossover
|
||||
- RSI Crossover
|
||||
- Turtle Breakout
|
||||
|
||||
Intermediate:
|
||||
|
||||
- Bollinger Reversion
|
||||
- Bollinger Squeeze
|
||||
- Ichimoku Cloud
|
||||
- Pulse Sync
|
||||
- Index Momentum
|
||||
|
||||
Advanced:
|
||||
|
||||
- Quantum Velocity
|
||||
- Mercy Edge
|
||||
- Dynamic Breakout
|
||||
- Index Breakout Pro
|
||||
|
||||
Expert:
|
||||
|
||||
- QuantumBotX Hybrid
|
||||
- QuantumBotX Crypto
|
||||
|
||||
Strategy availability and behavior are validated by:
|
||||
|
||||
```bash
|
||||
# Create a new Wine prefix for MT5 (recommended for isolation)
|
||||
export WINEPREFIX="$HOME/.wine-mt5"
|
||||
wineboot --init
|
||||
|
||||
# Install required Windows components
|
||||
winetricks corefonts vcrun2019 dotnet48
|
||||
python testing/validate_all_strategies.py
|
||||
```
|
||||
|
||||
### 3. Download and Install MetaTrader 5
|
||||
```bash
|
||||
# Download MT5 installer from your broker's website
|
||||
# Example for XM Global:
|
||||
wget https://download.mql5.com/cdn/web/metaquotes.software.corp/mt5/xmglobal5setup.exe
|
||||
## Testing Policy
|
||||
|
||||
# Install MT5 using Wine
|
||||
wine xmglobal5setup.exe
|
||||
```
|
||||
Public-safe tests and diagnostics belong in `testing/`.
|
||||
|
||||
### 4. Configure Python Environment
|
||||
```bash
|
||||
# Set up the project as usual
|
||||
git clone https://github.com/rebarakaz/quantumbotx.git
|
||||
cd quantumbotx
|
||||
python -m venv venv
|
||||
source venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
Local account-specific scripts, broker diagnostics, recovery scripts, logs, and
|
||||
anything with private account context belong in `testing_private/`, which is
|
||||
ignored by Git.
|
||||
|
||||
# Configure environment variables
|
||||
cp .env.example .env
|
||||
# Edit .env with your MT5 credentials
|
||||
```
|
||||
## Repository Notes
|
||||
|
||||
### 5. Run QuantumBotX with Wine
|
||||
```bash
|
||||
# Start MT5 in Wine (in background)
|
||||
export WINEPREFIX="$HOME/.wine-mt5"
|
||||
wine "$HOME/.wine-mt5/drive_c/Program Files/MetaTrader 5/terminal64.exe" &
|
||||
- `README.md` is the canonical public README.
|
||||
- `ROADMAP.md` describes the current MT5-focused direction for `main`.
|
||||
- Internal notes such as `MEMORY.md`, `TASKS.md`, `RETROSPECT.md`, and
|
||||
`WALKTHROUGH.md` are ignored and should not be committed publicly.
|
||||
- The app intentionally keeps local `.env`, database files, logs, and broker
|
||||
state files out of Git.
|
||||
|
||||
# Wait for MT5 to fully load, then start QuantumBotX
|
||||
python run.py
|
||||
```
|
||||
## Troubleshooting
|
||||
|
||||
### 6. Troubleshooting Tips
|
||||
- **MT5 Connection Issues**: Ensure MT5 is fully loaded before starting QuantumBotX
|
||||
- **Wine Performance**: Use `winecfg` to adjust graphics settings for better performance
|
||||
- **Font Issues**: Install additional fonts with `winetricks corefonts`
|
||||
- **Memory Issues**: Increase Wine's virtual memory in `winecfg`
|
||||
If MT5 connection fails:
|
||||
|
||||
### Alternative: Docker Approach
|
||||
For advanced users, you can also run MT5 in a Windows container:
|
||||
```bash
|
||||
# This requires Docker with Windows container support
|
||||
# Implementation details depend on your specific setup
|
||||
```
|
||||
- Make sure MetaTrader 5 is open and logged in.
|
||||
- Confirm the account, password, and server in `.env`.
|
||||
- Check that the symbol exists in Market Watch.
|
||||
- Try a demo account first.
|
||||
- Restart MT5 before restarting QuantumBotX.
|
||||
|
||||
> **Note**: Wine performance may vary depending on your Linux distribution and hardware. For production trading, consider using a dedicated Windows machine or VM.
|
||||
If dependency installation fails:
|
||||
|
||||
---
|
||||
- Use Python 3.12.
|
||||
- Upgrade pip: `python -m pip install --upgrade pip`.
|
||||
- Re-run `pip install -r requirements.txt`.
|
||||
|
||||
## 🖥️ System Requirements
|
||||
## Disclaimer
|
||||
|
||||
### Windows (Native Support)
|
||||
- Windows 10/11 (64-bit recommended)
|
||||
- MetaTrader 5 terminal
|
||||
- Python 3.10 or higher
|
||||
- Minimum 4GB RAM
|
||||
- Stable internet connection
|
||||
Trading foreign exchange, CFDs, crypto CFDs, and other leveraged products
|
||||
involves significant risk. This software is provided for educational and
|
||||
research purposes only. The author is not responsible for financial losses,
|
||||
missed trades, broker issues, execution errors, or misuse of the software.
|
||||
|
||||
### Linux (Wine Required)
|
||||
- Any modern Linux distribution
|
||||
- Wine 6.0 or higher
|
||||
- Python 3.10 or higher
|
||||
- Minimum 6GB RAM (Wine overhead)
|
||||
- X11 or Wayland display server
|
||||
Always validate on a demo account and use conservative risk settings.
|
||||
|
||||
### macOS (Not Officially Supported)
|
||||
- macOS users may attempt Wine/CrossOver setup
|
||||
- Consider using Windows VM or Parallels
|
||||
- Not recommended for production trading
|
||||
## License
|
||||
|
||||
---
|
||||
This project is licensed under the MIT License. See `LICENSE.md`.
|
||||
|
||||
## ⚠️ Disclaimer
|
||||
## Author
|
||||
|
||||
Trading foreign exchange on margin carries a high level of risk and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to trade, you should carefully consider your investment objectives, level of experience, and risk appetite.
|
||||
|
||||
This software is provided "as is" for educational and research purposes. The author is not responsible for any financial losses incurred from using this bot. **Always test thoroughly on a demo account before using on a live account.**
|
||||
|
||||
---
|
||||
|
||||
## 📈 Screenshot
|
||||
|
||||
### Dashboard Preview
|
||||
Main dashboard showing bot status, performance metrics, and quick access to all features.
|
||||
|
||||

|
||||
|
||||
### Demo Account View
|
||||
Example of a demo trading account with risk management settings and strategy configuration.
|
||||
|
||||
### Strategy Configuration
|
||||
Interface for setting up and customizing trading strategies with ATR-based risk management.
|
||||

|
||||
|
||||
### Backtesting Results
|
||||
Visualization of strategy performance with interactive charts and detailed metrics.
|
||||

|
||||
|
||||
---
|
||||
|
||||
## 🧠 Author
|
||||
|
||||
Developed with 💖 by **Chrisnov IT Solutions**
|
||||
Concept, Logic & Execution: `@chrisnov` aka BabyDev
|
||||
|
||||
---
|
||||
|
||||
## ☕ Support This Project
|
||||
|
||||
If you like this project, give it a ⭐ on GitHub, or buy me a coffee to support future versions:
|
||||
|
||||
[<img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" alt="Donate with PayPal" />](https://www.paypal.com/paypalme/rebarakaz)
|
||||
|
||||
---
|
||||
|
||||
## 📝 License
|
||||
|
||||
This project is licensed under the MIT License - see the LICENSE.md file for details.
|
||||
Developed by Chrisnov IT Solutions.
|
||||
|
||||
-203
@@ -1,203 +0,0 @@
|
||||
# 🤖 QuantumBotX — AI-Powered Modular Trading Bot for MT5
|
||||
|
||||
Welcome to **QuantumBotX**, your personal, modular, and smart trading assistant built with Python and MetaTrader5 (MT5).
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Quick Start with MT5 Integration
|
||||
|
||||
**New to QuantumBotX?** Follow these 3 simple steps:
|
||||
|
||||
### ⚡ Step 1: Install MT5 Integration
|
||||
```bash
|
||||
# Automatically detect, install, and configure MT5
|
||||
python install_mt5_integration.py
|
||||
|
||||
# This will:
|
||||
# ✅ Check Python compatibility
|
||||
# ✅ Install MetaTrader5 library
|
||||
# ✅ Verify MT5 platform installation
|
||||
# ✅ Create .env configuration template
|
||||
# ✅ Generate connection test script
|
||||
```
|
||||
|
||||
### 🏦 Step 2: Setup MT5 Platform
|
||||
```bash
|
||||
# 1. Download MT5 from: https://www.metatrader5.com/en/download
|
||||
# 2. Install with default settings
|
||||
# 3. Launch MT5 and create/login to demo account
|
||||
# 4. Keep MT5 running - it's required for data downloads
|
||||
```
|
||||
|
||||
### ⚙️ Step 3: Configure & Test
|
||||
```bash
|
||||
# Edit your .env file with MT5 credentials:
|
||||
# MT5_LOGIN=your_account_number
|
||||
# MT5_PASSWORD=your_password
|
||||
# MT5_SERVER=FBS-Demo
|
||||
|
||||
# Test your MT5 connection:
|
||||
python test_mt5_connection.py
|
||||
|
||||
# Download market data (or use web interface):
|
||||
python lab/download_data.py
|
||||
|
||||
# Start trading interface:
|
||||
python run.py
|
||||
```
|
||||
|
||||
### ❓ Need Help?
|
||||
- 📖 **Full Guide**: Check `MT5_SETUP_GUIDE.md`
|
||||
- 🧪 **Quick Test**: `python test_mt5_connection.py`
|
||||
- 🔧 **Manual Config**: Edit `.env` file directly
|
||||
|
||||
---
|
||||
|
||||
## 🎯 Key Features
|
||||
|
||||
### 📊 **Professional Backtesting**
|
||||
- **MT5 Data Integration**: Download 50+ instruments directly from brokers
|
||||
- **Realistic Modeling**: Spread, slippage, and commission simulation
|
||||
- **Strategy Testing**: 16+ strategies with custom parameters
|
||||
- **Performance Analytics**: Equity curves, drawdown analysis, risk metrics
|
||||
|
||||
### 🧠 **Smart Bot Management**
|
||||
- **Real-Time Monitoring**: Live bot status with auto-refresh
|
||||
- **Risk Protection**: Ultra-safe position sizing, especially for gold/XAUUSD
|
||||
- **Strategy Switching**: Automated strategy adaptation to market conditions
|
||||
- **Multi-Broker Support**: XM Global, FBS, Exness, IC Markets, Pepperstone
|
||||
|
||||
### 🔍 **Market Analysis**
|
||||
- **Live Data Analysis**: Real-time signals from MT5 market data
|
||||
- **Multi-Timeframe**: Daily, H1, M15 analysis for comprehensive signals
|
||||
- **Holiday Detection**: Automatic Christmas/Ramadan mode activation
|
||||
- **AI Mentor**: Personalized trading guidance in Indonesian
|
||||
|
||||
### 🔐 **Safety First**
|
||||
- **Conservative Defaults**: Beginner-safe settings out of the box
|
||||
- **Account Protection**: Emergency brakes and risk limits
|
||||
- **Testing Mode**: Demo account support before live trading
|
||||
- **Clean Architecture**: Modular design for reliability
|
||||
|
||||
---
|
||||
|
||||
## 🗂️ Data Download Features
|
||||
|
||||
### Available Instruments
|
||||
- **Forex**: EURUSD, GBPUSD, AUDUSD, JPY pairs, major crosses
|
||||
- **Gold**: XAUUSD with ultra-conservative risk management
|
||||
- **Indices**: US30, US100, US500 (S&P 500), DE30, UK100
|
||||
- **Commodities**: Oil (USOIL, UKOIL), Natural Gas
|
||||
- **Crypto**: BTCUSD, ETHUSD (if supported by broker)
|
||||
- **Exotic Pairs**: Currency pairs for advanced traders
|
||||
|
||||
### Data Quality
|
||||
- ✅ **4+ Years** of historical data
|
||||
- ✅ **OHLCV Format**: Open, High, Low, Close, Volume
|
||||
- ✅ **Broker Aliasing**: Automatic XAUUSD/USDIDR variant detection
|
||||
- ✅ **Timeframes**: H1 (recommended), M1, M5, M15, H4, D1
|
||||
|
||||
### Download Methods
|
||||
1. **Web Interface**: Click "Download Data MT5" button on backtesting page
|
||||
2. **Command Line**: `python lab/download_data.py`
|
||||
3. **Automatic Installer**: `python install_mt5_integration.py`
|
||||
|
||||
---
|
||||
|
||||
## 🧪 Technical Stack
|
||||
|
||||
- **Python 3.10+** with async capabilities
|
||||
- **Flask** web framework with real-time updates
|
||||
- **MetaTrader5** direct broker integration
|
||||
- **pandas-ta** for technical analysis
|
||||
- **Chart.js** for interactive visualizations
|
||||
- **SQLite** with migration support
|
||||
|
||||
---
|
||||
|
||||
## 🧠 AI Mentor Features
|
||||
|
||||
- **Indonesian Language**: Guidance in Bahasa Indonesia
|
||||
- **Emotional Intelligence**: Understanding trader psychology
|
||||
- **Performance Analysis**: Trade pattern recognition
|
||||
- **Risk Assessment**: Personalized risk tolerance evaluation
|
||||
- **Strategy Recommendations**: Matching strategies to trader level
|
||||
- **Motivational Support**: Contextual encouragement
|
||||
|
||||
---
|
||||
|
||||
## 📚 Educational Framework
|
||||
|
||||
### Beginner Path (Month 1)
|
||||
- **Week 1**: MA Crossover on EURUSD
|
||||
- **Week 2**: Bollinger Bands for range trading
|
||||
- **Week 3**: Basic risk management practices
|
||||
- **Week 4**: Understanding ATR-based position sizing
|
||||
|
||||
### Intermediate Path (Month 2-3)
|
||||
- **Strategy Rotation**: Multiple approaches per market
|
||||
- **Parameter Optimization**: Finding edge through testing
|
||||
- **Market Analysis**: Understanding different market regimes
|
||||
- **Risk Scaling**: Position sizing based on confidence
|
||||
|
||||
### Advanced Mastery (Month 4+)
|
||||
- **Strategy Combination**: Multi-strategy portfolios
|
||||
- **Market Timing**: When to trade what
|
||||
- **Risk Management**: Advanced portfolio protection
|
||||
- **Psychology**: Maintaining discipline
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ Important Disclaimers
|
||||
|
||||
**Trading Risks:**
|
||||
- FX trading involves substantial risk and may not be suitable for all
|
||||
- High leverage can amplify losses
|
||||
- Past performance ≠ future results
|
||||
- Never trade with money you can't afford to lose
|
||||
|
||||
**Software Usage:**
|
||||
- For educational/research purposes
|
||||
- Test thoroughly on demo accounts first
|
||||
- Creator not responsible for trading losses
|
||||
- Use at your own risk
|
||||
|
||||
---
|
||||
|
||||
## 🤝 Support & Community
|
||||
|
||||
- **Documentation**: Full setup guides in `/docs`
|
||||
- **Issues**: GitHub Issues for bugs/features
|
||||
- **Discussions**: Community support forum
|
||||
- **Updates**: Check changelog for improvements
|
||||
|
||||
---
|
||||
|
||||
## 📈 What's Next?
|
||||
|
||||
### Current Features ✅
|
||||
- ✅ MT5 Integration with 50+ instruments
|
||||
- ✅ 16 Trading strategies with risk management
|
||||
- ✅ AI mentor in Indonesian
|
||||
- ✅ Professional backtesting engine
|
||||
- ✅ Holiday-aware trading modes
|
||||
- ✅ Ultra-conservative gold/XAUUSD protection
|
||||
|
||||
### Coming Soon 🚧
|
||||
- 🔄 Telegram notifications
|
||||
- 🔄 Advanced portfolio analytics
|
||||
- 🔄 Multi-broker arbitrage
|
||||
- 🔄 Custom strategy builder
|
||||
- 🔄 Community marketplace
|
||||
|
||||
---
|
||||
|
||||
## ☕ Support Development
|
||||
|
||||
Enjoy QuantumBotX? Consider supporting future development:
|
||||
|
||||
[<img src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" alt="Donate with PayPal" />](https://www.paypal.com/paypalme/rebarakaz)
|
||||
|
||||
---
|
||||
|
||||
*Happy Trading! 🎯📊🏆*
|
||||
Reference in New Issue
Block a user