Files
quantumbotx/README.md
T

217 lines
5.5 KiB
Markdown
Raw Normal View History

2026-05-19 12:43:19 +08:00
# QuantumBotX
2026-05-19 12:43:19 +08:00
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.
2026-05-19 12:43:19 +08:00
Use this project for education, research, demo trading, and strategy validation.
Always test on a demo account before considering any live trading.
2026-05-19 12:43:19 +08:00
## Current Scope
2026-05-19 12:43:19 +08:00
- 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.
2026-05-19 12:43:19 +08:00
Experimental cross-platform work belongs on dedicated development branches, not
on `main`.
2026-05-19 12:43:19 +08:00
## Features
2026-05-19 12:43:19 +08:00
- 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.
2026-05-19 12:43:19 +08:00
## Platform Support
2026-05-19 12:43:19 +08:00
### Supported
2026-05-19 12:43:19 +08:00
- Windows 10/11, 64-bit recommended.
- MetaTrader 5 terminal installed locally.
- Python 3.12 recommended.
### Experimental
- 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.
### Not Supported On `main`
- Cloud/VPS without a local MT5 terminal session.
- Native non-MT5 broker execution.
- Cross-platform broker runtimes.
## Quick Start
1. Clone the repository:
```bash
2026-05-19 17:30:45 +08:00
git clone https://github.com/chrisnov-it/quantumbotx.git
2026-05-19 12:43:19 +08:00
cd quantumbotx
```
2. Create and activate a virtual environment:
```bash
python -m venv venv
.\venv\Scripts\activate
```
3. Install dependencies:
2026-05-19 12:43:19 +08:00
```bash
pip install -r requirements.txt
```
4. Install and open MetaTrader 5.
Log in to a demo account first and keep the terminal running while using
QuantumBotX.
5. Configure `.env`:
```bash
copy .env.example .env
```
Then fill in:
```env
MT5_LOGIN=your_mt5_login
MT5_PASSWORD=your_mt5_password
MT5_SERVER=your_broker_server
SECRET_KEY=change_me
DB_NAME=bots.db
```
6. Start the app:
```bash
python run.py
```
## Optional MT5 Helper
The project includes an MT5 setup helper:
```bash
2026-05-19 12:43:19 +08:00
python install_mt5_integration.py
```
2026-05-19 12:43:19 +08:00
Use it to check Python compatibility, MetaTrader5 package availability, MT5
terminal installation, and basic environment setup.
2026-05-19 12:43:19 +08:00
For more detail, see `MT5_SETUP_GUIDE.md`.
2026-05-19 12:43:19 +08:00
## Data And Backtesting
2026-05-19 12:43:19 +08:00
QuantumBotX can download historical OHLCV data through MT5 and use it for
strategy testing. Typical workflows:
2026-05-19 12:43:19 +08:00
- Use the web interface on the backtesting page.
- Run `python lab/download_data.py`.
- Upload CSV files through the backtesting UI.
2026-05-19 12:43:19 +08:00
Supported markets depend on the connected MT5 broker. Common examples include:
2026-05-19 12:43:19 +08:00
- 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.
2026-05-19 12:43:19 +08:00
## Strategy Collection
2026-05-19 12:43:19 +08:00
Beginner-friendly:
2026-05-19 12:43:19 +08:00
- 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
python testing/validate_all_strategies.py
```
2026-05-19 12:43:19 +08:00
## Testing Policy
2026-05-19 12:43:19 +08:00
Public-safe tests and diagnostics belong in `testing/`.
2026-05-19 12:43:19 +08:00
Local account-specific scripts, broker diagnostics, recovery scripts, logs, and
anything with private account context belong in `testing_private/`, which is
ignored by Git.
2026-05-19 12:43:19 +08:00
## Repository Notes
2026-05-19 12:43:19 +08:00
- `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.
2026-05-19 12:43:19 +08:00
## Troubleshooting
2026-05-19 12:43:19 +08:00
If MT5 connection fails:
2026-05-19 12:43:19 +08:00
- 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.
2026-05-19 12:43:19 +08:00
If dependency installation fails:
2026-05-19 12:43:19 +08:00
- Use Python 3.12.
- Upgrade pip: `python -m pip install --upgrade pip`.
- Re-run `pip install -r requirements.txt`.
2026-05-19 12:43:19 +08:00
## Disclaimer
2026-05-19 12:43:19 +08:00
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.
2026-05-19 12:43:19 +08:00
Always validate on a demo account and use conservative risk settings.
2026-05-19 12:43:19 +08:00
## License
2026-05-19 12:43:19 +08:00
This project is licensed under the MIT License. See `LICENSE.md`.
2026-05-19 12:43:19 +08:00
## Author
2026-05-19 12:43:19 +08:00
Developed by Chrisnov IT Solutions.