Skip to content

Millsondylan/MegaAutoTrader-EA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Mega Auto-Trader EA (Expert Advisor)

Professional multi-strategy automated trading Expert Advisor for MetaTrader 5 with AI/ML integration and real-time cloud connectivity.

πŸš€ Features

Core Trading Engine

  • Multi-Strategy Support: Trend Following, Breakout, Scalping, Grid Trading, Statistical Arbitrage
  • Risk Management: Advanced position sizing, stop-loss, take-profit, and drawdown protection
  • Real-time Monitoring: Live connection to web dashboard and mobile app
  • AI/ML Integration: Machine learning filters and predictive analytics

Strategies Included

  1. ConfluencePA - Price Action with multiple timeframe confluence
  2. GridHedger - Grid trading with hedging capabilities
  3. MLFilter - Machine learning-based trade filtering
  4. Scalper - High-frequency scalping strategy
  5. StatArb - Statistical arbitrage across correlated pairs

Cloud Integration

  • Firebase Connectivity: Real-time data sync with web dashboard
  • Push Notifications: Instant alerts for trade events
  • Analytics: Comprehensive trading performance tracking
  • Remote Control: Web-based EA management and configuration

πŸ“ Project Structure

MegaAutoTrader-EA/
β”œβ”€β”€ EA_Main.mq5              # Main EA entry point
β”œβ”€β”€ Config.json              # Configuration file
β”œβ”€β”€ Core/                    # Core EA modules
β”‚   β”œβ”€β”€ IntegrationManager.mqh  # Firebase integration
β”‚   β”œβ”€β”€ RiskManager.mqh        # Risk management
β”‚   β”œβ”€β”€ StrategyManager.mqh    # Strategy orchestration
β”‚   β”œβ”€β”€ TradeManager.mqh       # Trade execution
β”‚   └── Utilities.mqh          # Utility functions
β”œβ”€β”€ Strategies/              # Trading strategies
β”‚   β”œβ”€β”€ ConfluencePA.mqh      # Price action strategy
β”‚   β”œβ”€β”€ GridHedger.mqh        # Grid trading strategy
β”‚   β”œβ”€β”€ MLFilter.mqh          # ML filtering strategy
β”‚   β”œβ”€β”€ Scalper.mqh           # Scalping strategy
β”‚   └── StatArb.mqh           # Statistical arbitrage
└── ml/                      # Machine learning server
    β”œβ”€β”€ MLServer.py           # Python ML server
    β”œβ”€β”€ requirements.txt      # Python dependencies
    └── start_ml_server.sh    # ML server startup script

πŸ› οΈ Installation

Prerequisites

  • MetaTrader 5 (latest version)
  • Python 3.8+ (for ML features)
  • Firebase project setup

Setup Steps

  1. Install EA Files

    # Copy EA files to MT5 Experts folder
    cp -r * /path/to/MT5/MQL5/Experts/MegaAutoTrader/
  2. Configure Firebase

    # Update Config.json with your Firebase credentials
    {
      "ProjectId": "your-firebase-project-id",
      "ApiKey": "your-firebase-api-key",
      "AuthDomain": "your-project.firebaseapp.com"
    }
  3. Start ML Server

    cd ml
    pip install -r requirements.txt
    ./start_ml_server.sh
  4. Compile EA

    • Open MetaTrader 5
    • Navigate to MetaEditor
    • Open EA_Main.mq5
    • Click Compile (F7)

βš™οΈ Configuration

EA Parameters

  • Risk Percentage: Maximum risk per trade (default: 2%)
  • Max Positions: Maximum concurrent positions (default: 5)
  • Stop Loss: Default stop loss in pips (default: 50)
  • Take Profit: Default take profit in pips (default: 100)
  • Strategy Selection: Enable/disable individual strategies

Firebase Configuration

{
  "ProjectId": "mega-auto-trader",
  "ApiKey": "your-api-key",
  "AuthDomain": "mega-auto-trader.firebaseapp.com",
  "StorageBucket": "mega-auto-trader.appspot.com",
  "MessagingSenderId": "123456789",
  "AppId": "1:123456789:web:abcdef"
}

πŸ”§ Usage

Starting the EA

  1. Attach EA to desired chart
  2. Configure parameters in EA settings
  3. Enable "Allow live trading"
  4. Click OK to start

Monitoring

  • Web Dashboard: Real-time monitoring at https://your-app.web.app
  • Mobile App: Download from App Store/Google Play
  • MT5 Terminal: Check EA status in Experts tab

Strategy Management

  • Enable/disable strategies via web dashboard
  • Adjust parameters in real-time
  • View performance analytics
  • Set risk management rules

πŸ“Š Analytics & Reporting

Performance Metrics

  • Win Rate: Percentage of profitable trades
  • Profit Factor: Gross profit / Gross loss
  • Sharpe Ratio: Risk-adjusted returns
  • Maximum Drawdown: Largest peak-to-trough decline
  • Total Return: Overall performance

Real-time Data

  • Live account balance and equity
  • Open positions and P&L
  • Strategy performance breakdown
  • Risk metrics and alerts

πŸ”’ Security

Risk Management

  • Position Sizing: Dynamic lot calculation based on account size
  • Stop Loss: Automatic stop loss placement
  • Take Profit: Profit target management
  • Drawdown Protection: Automatic shutdown on excessive losses
  • Correlation Limits: Prevent over-exposure to correlated pairs

Data Security

  • Encrypted Communication: All Firebase data encrypted in transit
  • Authentication: Secure user authentication required
  • Audit Trail: Complete trading history and logs
  • Backup: Automatic data backup and recovery

🚨 Troubleshooting

Common Issues

  1. EA Not Starting

    • Check "Allow live trading" is enabled
    • Verify Firebase configuration
    • Check internet connection
  2. No Trades Executing

    • Verify market hours
    • Check strategy parameters
    • Review risk management settings
  3. ML Server Issues

    • Check Python installation
    • Verify dependencies installed
    • Check server logs
  4. Firebase Connection

    • Verify API key and project ID
    • Check network connectivity
    • Review Firebase console logs

Debug Mode

Enable debug logging in EA parameters to get detailed information about:

  • Strategy decisions
  • Trade execution
  • Risk management
  • Firebase communication

πŸ“ˆ Performance Optimization

Best Practices

  1. VPS Hosting: Use Virtual Private Server for 24/7 operation
  2. Low Latency: Choose servers close to broker
  3. Memory Management: Monitor EA memory usage
  4. Regular Updates: Keep EA and strategies updated
  5. Backtesting: Test strategies before live trading

Recommended Settings

  • Timeframe: M5 or M15 for most strategies
  • Spread: Maximum 3 pips for scalping
  • Slippage: Maximum 5 pips
  • News Filter: Enable during high-impact news

πŸ”„ Updates & Maintenance

Version Control

  • Track changes in Git repository
  • Tag stable releases
  • Maintain changelog

Regular Maintenance

  • Monitor performance metrics
  • Update ML models
  • Review and optimize strategies
  • Backup configuration files

πŸ“ž Support

Documentation

Contact

πŸ“„ License

This software is proprietary and confidential. Unauthorized copying, distribution, or use is strictly prohibited.


Version: 1.0.0
Last Updated: January 2024
Compatibility: MetaTrader 5 Build 3000+

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published