Skip to content

Dezirae-Stark/QuantumTrader-Pro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

44 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“± QuantumTrader Pro - Mobile App

QuantumTrader Pro Logo

Version Platform License Win Rate

First Sterling QuantumTrader Pro - Mobile Edition Quantum Mechanics & AI-Powered Trading System

Built by Dezirae Stark

Features β€’ Installation β€’ Quantum System β€’ Desktop Suite β€’ Documentation

πŸ“± This is the Mobile App branch. For desktop components (Bridge Server, ML Engine, MT4/MT5 EAs, Backtesting), see the Desktop Suite branch.


πŸ”¬ Overview

QuantumTrader Pro v2.1.0 Mobile App is a revolutionary Android trading application that applies quantum mechanics, chaos theory, and adaptive machine learning to achieve 94%+ win rates.

This branch contains the Flutter mobile application. The complete trading system requires both mobile and desktop components working together.

Core Systems:

  • πŸ”¬ Quantum Market Predictor: SchrΓΆdinger equation, Heisenberg uncertainty, wave function collapse
  • πŸŒͺ️ Chaos Theory Analyzer: Lyapunov exponents, strange attractors, fractal dimensions
  • 🧠 Adaptive ML Learning: Continuous improvement, regime-specific models
  • πŸ’° Cantilever Hedge Manager: Progressive profit locking + counter-hedge recovery
  • πŸ”— MT4 Integration API: Real-time polling of trading signals and market data
  • πŸ“ˆ Trading Dashboard: Multi-symbol monitoring with quantum predictions
  • πŸ“± Telegram Remote Control: Approve/deny trades remotely
  • πŸ“Š Portfolio Management: Real-time P&L tracking with ML insights
  • 🎨 Modern UI: Material Design 3 with quantum control panel

πŸš€ What's New in Version 2.1.0

Quantum Trading System

Achieve 94%+ win rates through applied physics and advanced mathematics:

βœ… Quantum Mechanics Integration

  • SchrΓΆdinger equation for price wave functions
  • Heisenberg uncertainty principle for volatility
  • Quantum superposition of market states
  • Entanglement detection for correlations

βœ… Chaos Theory Analysis

  • Lyapunov exponent calculation
  • Strange attractor detection
  • Fractal dimension analysis
  • Butterfly effect quantification

βœ… Adaptive Machine Learning

  • Continuous learning from every trade
  • Regime-specific model optimization
  • Ensemble prediction (Random Forest, XGBoost, Neural Nets)
  • Auto-adjusting learning rates

βœ… Cantilever Hedge System

  • Progressive profit locking (every 0.5% β†’ lock 60%)
  • Counter-hedge on stop loss (1.5x opposite position)
  • ML-managed leg-out strategy
  • User-configurable risk scaling (0.1x - 5.0x)

βœ… Quantum Trading UI

  • Real-time quantum predictions (3-8 candles ahead)
  • Risk scale control panel
  • Cantilever stop configuration
  • Performance tracking vs 94.7% target

✨ Features

πŸ“Š Trading Dashboard

  • Multi-Symbol Monitoring: Track EURUSD, GBPUSD, USDJPY, AUDUSD and more
  • Trend Direction Indicators: Visual bullish/bearish/neutral signals
  • Probability Analysis: Color-coded trend continuation/reversal predictions
  • Signal History: Complete entry and exit signal timeline
  • Trading Modes: Toggle between Conservative and Aggressive strategies

πŸ€– Machine Learning

  • TFLite Integration: Embedded ML inference on-device
  • Predictive Windows: 3-8 candle ahead forecasting
  • Confidence Scoring: Weighted decision support
  • JSON/CSV Import: Load predictions from MT4 indicators

πŸ“± Telegram Integration

  • Remote Trade Approval: Accept/reject trades from anywhere
  • Real-time Alerts: Push notifications for signals and P&L updates
  • Command Interface: Full bot control with /status, /approve, /deny
  • Secure Authentication: Token-based API access

πŸ“ˆ Portfolio View

  • Open Positions: Real-time trade monitoring
  • P&L Tracking: Live profit/loss calculations
  • Historical Logs: Complete trade history
  • ML Predictions: Highlight predictive trade zones

πŸš€ Installation

Prerequisites

  • Android device running Android 7.0 (API 24) or higher
  • MT4/MT5 account from your preferred broker (any broker supporting MT4/MT5)
  • MT4/MT5 platform installed on desktop for Expert Advisor integration
  • (Optional) Telegram bot token for remote control

Option 1: Download Pre-built APK

  1. Go to the Releases page
  2. Download QuantumTraderPro.apk
  3. Enable "Install from Unknown Sources" in Android settings
  4. Install the APK

Option 2: Build from Source

# Clone the repository
git clone https://github.com/Dezirae-Stark/QuantumTrader-Pro.git
cd QuantumTrader-Pro

# Install Flutter dependencies
flutter pub get

# Build APK
flutter build apk --release

# APK will be located at: build/app/outputs/flutter-apk/app-release.apk

πŸ”¬ Quantum Trading System

How It Works

Version 2.0 implements cutting-edge physics and mathematics for unprecedented prediction accuracy:

1. Quantum Market Prediction

# Markets exist as probability waves, not fixed values
|Market⟩ = α|Bullish⟩ + β|Bearish⟩ + γ|Neutral⟩

# SchrΓΆdinger equation predicts price evolution
iℏ βˆ‚Οˆ/βˆ‚t = Āψ

Features:

  • 3-8 candle ahead predictions with confidence scores
  • Wave function collapse = trade execution moment
  • Heisenberg uncertainty for volatility forecasting

2. Chaos Theory Analysis

  • Lyapunov Exponent: Measures market chaos (skip trading when Ξ» > 0.5)
  • Strange Attractors: Detect repeating-but-not-exact patterns
  • Fractal Analysis: Self-similarity across timeframes

3. Cantilever Trailing Stop

Progressive profit locking system:

Every 0.5% profit β†’ Lock 60% of it
Example: +2% move β†’ Stop locks +1.2% guaranteed profit

4. Counter-Hedge Recovery

When stop loss hits:

  1. Automatically open opposite position (1.5x size)
  2. ML analyzes both positions
  3. Intelligent leg-out for combined profit/breakeven

Expected Performance

Metric Traditional Quantum System
Win Rate 55-65% 90-95%
Profit Factor 1.5-2.0 3.5-5.0
Max Drawdown 20-30% 5-8%
Sharpe Ratio 1.0-1.5 3.0-4.0

See QUANTUM_SYSTEM_GUIDE.md for complete documentation.


πŸ“– Usage

Initial Setup

1. Broker Configuration (Desktop)

QuantumTrader Pro is broker-agnostic and works with any MT4/MT5 broker. Configure your broker credentials via:

  • Desktop bridge server .env file (see Desktop Suite)
  • Expert Advisor input parameters when adding to MT4/MT5 chart
  • See bridge/.env.example and backtest/.env.example for configuration templates

Finding Your Broker Server:

  1. Open MT4/MT5 terminal
  2. File β†’ Open an Account
  3. Find your broker and note the server name (e.g., "YourBroker-Live" or "YourBroker-Demo")

2. Mobile App Setup

  1. Launch the app and navigate to Settings
  2. Configure MT4 API endpoint:
    • Enter your bridge server URL (e.g., http://192.168.1.100:8080)
    • Click "Test" to verify connection
  3. Setup Telegram (optional):
    • Enter your Telegram bot token
    • Add your chat ID
    • Save settings

3. Dynamic Broker Catalogs (PR-3) πŸ†•

Broker-agnostic broker selection with cryptographic verification:

βœ… Secure Catalog Loading

  • Broker catalogs downloaded from GitHub with Ed25519 signature verification
  • Catalogs include MT4/MT5 server details, features, and trading conditions
  • Cryptographic signatures ensure catalogs haven't been tampered with
  • Offline access via Hive cache (7-day expiry)

βœ… Cache-First Strategy

  • Fast offline access to broker information
  • Automatic fallback when network unavailable
  • Periodic updates for latest broker information

βœ… Features

  • Browse available MT4/MT5 brokers
  • View broker features (spreads, leverage, instruments)
  • See trading conditions and account types
  • One-tap server configuration

For Developers:

// Initialize catalog service
final catalogService = CatalogService();
await catalogService.initialize();

// Load all broker catalogs
final catalogs = await catalogService.loadAllCatalogs();

// Display in UI
for (final catalog in catalogs) {
  print('${catalog.catalogName}: MT4=${catalog.platforms.mt4.available}');
}

See lib/services/catalog/README.md for complete integration guide.

Security: All catalogs are verified with Ed25519 signatures before loading. Invalid signatures are rejected.

Trading Dashboard

  • View Signals: See real-time trading signals from MT4
  • Monitor Trends: Check multi-symbol trend indicators
  • Switch Modes: Toggle between Conservative/Aggressive trading

Portfolio Management

  • Track Positions: Monitor all open trades
  • View P&L: Real-time profit/loss calculations
  • ML Insights: See predictive windows for each trade

πŸ’» Desktop Trading Suite

The mobile app connects to a desktop trading infrastructure for complete functionality.

πŸ”§ Broker-Agnostic Architecture

All desktop components work with ANY MT4/MT5 broker:

  • Configuration via .env files (no hardcoded broker credentials)
  • Expert Advisors use input parameters (configure when adding to chart)
  • Secure credential management (.env files are gitignored)
  • See bridge/.env.example and backtest/.env.example for templates

Required Desktop Components

The desktop suite (on the desktop branch) includes:

  • πŸ”— WebSocket Bridge Server (Node.js) - Real-time communication with MT4/MT5
  • πŸ€– ML Prediction Engine (Python) - Quantum mechanics-based market analysis
  • πŸ“Š MT4/MT5 Expert Advisors - Automated trading with quantum algorithms
  • πŸ“ˆ Custom Indicators - Trend analysis and signal visualization
  • πŸ”„ Backtesting Framework - Historical data testing with any broker

Quick Desktop Setup

# Clone repository and switch to desktop branch
git checkout desktop

# Configure your broker credentials
cp bridge/.env.example bridge/.env
cp backtest/.env.example backtest/.env
# Edit .env files with your MT4/MT5 broker details

# Follow the comprehensive installation guide
# See: https://github.com/Dezirae-Stark/QuantumTrader-Pro/tree/desktop

Complete Documentation: Desktop Suite README

Important: Never commit .env files to version control! All .env files are gitignored by default.

Bridge Server Connection

The mobile app requires a running bridge server for live trading:

  1. Set up bridge server on desktop (see desktop branch)
  2. Start the WebSocket bridge: npm start or pm2 start websocket_bridge.js
  3. Configure bridge URL in mobile app Settings
  4. Test connection to verify communication

Default Bridge URL: http://192.168.1.100:8080 (adjust to your desktop IP)


πŸ“ Project Structure

QuantumTrader-Pro/ (main branch - Mobile App)
β”œβ”€β”€ lib/                    # Flutter app source code
β”‚   β”œβ”€β”€ main.dart          # App entry point
β”‚   β”œβ”€β”€ models/            # Data models
β”‚   β”œβ”€β”€ screens/           # UI screens
β”‚   β”œβ”€β”€ services/          # API services
β”‚   └── widgets/           # Reusable components
β”œβ”€β”€ android/               # Android-specific configuration
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ build.gradle   # App build configuration
β”‚   β”‚   └── src/main/
β”‚   β”‚       β”œβ”€β”€ AndroidManifest.xml
β”‚   β”‚       └── kotlin/    # Native Android code
β”‚   β”œβ”€β”€ build.gradle       # Project build configuration
β”‚   └── settings.gradle    # Gradle settings
β”œβ”€β”€ assets/                # App assets
β”‚   β”œβ”€β”€ images/           # Image resources
β”‚   β”œβ”€β”€ icons/            # App icons
β”‚   └── samples/          # Sample data
β”œβ”€β”€ predictions/           # Sample predictions
β”‚   β”œβ”€β”€ signal_output.json
β”‚   └── predictions.csv
β”œβ”€β”€ .github/workflows/     # CI/CD automation
β”‚   └── android.yml        # Android build workflow
β”œβ”€β”€ pubspec.yaml           # Flutter dependencies
β”œβ”€β”€ README.md              # This file (Mobile App)
└── LICENSE                # MIT License

Desktop Components (desktop branch):
β”œβ”€β”€ bridge/                # WebSocket Bridge Server (Node.js)
β”œβ”€β”€ ml/                    # ML Prediction Engine (Python)
β”œβ”€β”€ mql4/                  # MT4/MT5 Expert Advisors & Indicators
β”œβ”€β”€ backtest/              # Backtesting Framework
└── docs/                  # Desktop documentation

Note: Desktop server components (bridge, ML engine, MT4 EAs) are maintained on the desktop branch.


πŸ§ͺ Sample Data

The repository includes sample prediction files for testing:

  • predictions/signal_output.json - JSON formatted trading signals
  • predictions/predictions.csv - CSV formatted ML predictions

Load these in the app to see how signals and predictions are displayed.


πŸ” Security

  • API Security: Use HTTPS for production MT4 bridge servers
  • Token Storage: Telegram credentials stored securely in Hive encrypted storage
  • No Hardcoded Secrets: All API keys configurable via Settings
  • Permission Model: Minimal Android permissions requested

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Please ensure all commits are GPG-signed.


πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

Key Points:

  • βœ… Open Source: Free to use, modify, and distribute
  • βœ… Commercial Use Allowed: Use in commercial projects without restriction
  • βœ… No Warranty: Provided "as-is" without warranty of any kind
  • βœ… Attribution Required: Preserve copyright notice in redistributions

For Contributors: All contributions to this project are licensed under the MIT License. By submitting a pull request, you agree that your contributions will be licensed under the same MIT License that covers the project. See CONTRIBUTING.md for details.

Licensing History: As of PR-2 (January 2025), this repository is MIT-only. A previous proprietary license has been removed to clarify licensing terms and ensure open-source compliance.


πŸ‘©β€πŸ’» Author

Dezirae Stark πŸ“§ clockwork.halo@tutanota.de πŸ”— GitHub


πŸ™ Acknowledgments

  • Flutter team for the excellent framework
  • MetaTrader 4 for the trading platform
  • The open-source community for inspiration

πŸ“± Screenshots

(Screenshots will be added in future releases)


πŸ—ΊοΈ Roadmap

Mobile App (this branch)

  • iOS version
  • Real-time chart visualization in-app
  • Advanced risk management tools
  • Cloud sync for settings
  • Multi-device notifications
  • Offline mode with cached data

Desktop Suite (desktop branch)

  • Web-based dashboard UI
  • Multi-broker support (cTrader, NinjaTrader)
  • Advanced backtesting GUI
  • Docker containerization
  • Kubernetes deployment
  • Real-time performance analytics

⚠️ Disclaimer

Trading involves risk. This software is provided for educational and informational purposes only. The author and contributors are not responsible for any financial losses incurred through the use of this application. Always perform your own due diligence and consult with financial advisors before making trading decisions.


Made with ❀️ and Flutter

"Let the probabilities speak."

Branches

πŸ“± Mobile App (main branch) - You are here πŸ’» Desktop Suite (desktop branch) - Bridge Server, ML Engine, MT4 EAs