Bridge the gap between algorithmic trading and intelligent automation.
TradeBridge Nexus transforms how traders connect Python's analytical power with MetaTrader 5's execution engine β using a file-based handshake protocol that's both lightweight and auditable.
- Overview & Philosophy
- System Architecture
- Key Features & Benefits
- Supported Operating Systems
- Quick Start Guide
- Configuration Profiles
- Console Invocation
- AI Integration (OpenAI & Claude)
- Responsive UI & Multilingual Support
- 24/7 Support & Monitoring
- Security & Disclaimer
- License & Contribution
- Download Again
In the vast ocean of financial technology, trading bridges often leak data, introduce latency, or require expensive infrastructure. TradeBridge Nexus was born from a different philosophy β the forest speaks in whispers, not screams.
Imagine a courier system where messages travel not through noisy radio waves, but through carefully placed notes in a hollow tree. That's our file-based approach: asynchronous, deterministic, and unforgeable. The Python client writes commands, the MQL5 server reads and executes, and the entire conversation is logged in plain sight.
This approach offers the zero-cost audit trail β every order, every price check, every status update becomes a permanent file on your system. No black boxes, no hidden API calls, no mysterious connection drops. Just pure, transparent communication between two powerful worlds.
flowchart TD
subgraph "Python Ecosystem"
A[Python Client] --> B[File Monitor]
B --> C{Command Queue}
C --> D[Order Files]
C --> E[Query Files]
C --> F[Config Files]
end
subgraph "File Bridge Layer"
G[(Shared Directory)]
D --> G
E --> G
F --> G
end
subgraph "MetaTrader 5"
H[MQL5 Server] --> I[File Scanner]
I --> J{Execution Engine}
J --> K[Trade Executor]
J --> L[Market Watcher]
J --> M[Account Manager]
end
subgraph "AI Layer"
N[OpenAI API] --> O[Strategy Optimizer]
P[Claude API] --> O
O --> A
end
style G fill:#f9f,stroke:#333,stroke-width:2px
style A fill:#6cf,stroke:#333,stroke-width:2px
style H fill:#f96,stroke:#333,stroke-width:2px
style N fill:#9f6,stroke:#333,stroke-width:2px
style P fill:#69f,stroke:#333,stroke-width:2px
How It Works:
- Python Client generates structured trade instructions (JSON files)
- File Bridge stores commands in a synchronized folder
- MQL5 Server polls for new files, parses them, and executes trades
- Response Files contain execution results, current prices, account status
- AI Advisors (OpenAI/Claude) analyze market data and suggest strategies
The beauty lies in the loose coupling β if either side crashes, the other continues gracefully. The files persist, the conversation resumes, and no capital is ever at risk from connection races.
- File encryption using AES-256-GCM for sensitive commands
- Digital signatures verify file authenticity (no spoofed orders)
- Read-only mode for MQL5 server (prevents accidental overwrites)
- Audit logs timestamp every interaction for regulatory compliance
- Sub-50ms latency for local file bridges (NVMe storage)
- Batch processing handles 1000+ commands per second
- Priority queues separate urgent orders from routine queries
- Memory-mapped files for large data transfers (10MB+)
- Multi-instance support β run multiple MT5 terminals simultaneously
- Symbol filtering β trade only instruments matching regex patterns
- Order templates β pre-define complex bracket orders with TP/SL
- Webhook bridge β connect TradingView or other platforms via Python layer
- Local file system (default) β no network dependency
- Network share β connect Python on Linux to MT5 on Windows
- Cloud sync β use Dropbox/OneDrive for remote management
- Docker container β deploy in isolated environments
| OS | Version | Status | Notes |
|---|---|---|---|
| πͺ Windows | 10, 11, Server 2022 | β Full Support | Native MQL5 execution |
| π§ Linux | Ubuntu 22.04+, Debian 11+ | β Full Support | Python client only |
| π macOS | Ventura+, Sonoma+ | β Full Support | Python client only |
| π΅ Docker | Alpine 3.18+ | β Containerized | Both sides in containers |
| βοΈ Cloud | AWS, Azure, GCP | β Supported | Via network shares |
Note: The MQL5 server component requires Windows with MetaTrader 5 installed. Python client runs on any platform with Python 3.9+.
- Python 3.9 or higher
- MetaTrader 5 (Build 4500+ for 2026 compatibility)
- Read/write access to a shared directory
# Clone the repository
git clone https://github.com/your-org/tradebridge-nexus.git
# Install Python dependencies
cd tradebridge-nexus/python-client
pip install -r requirements.txt
# Configure directory
mkdir /shared/tradebridge
chmod 755 /shared/tradebridge- Copy
TradeBridgeServer.ex5toMQL5/Experts/ - Attach to any chart (recommended: pair with lowest spread)
- Configure
Expert SettingsβFileBridgetab - Set
Shared Directoryto/shared/tradebridge
from tradebridge import Client as TBClient
# Initialize connection
bridge = TBClient(
shared_dir="/shared/tradebridge",
trading_pair="EURUSD",
lot_size=0.01
)
# Send a market order
response = bridge.market_order(
action="BUY",
volume=0.1,
comment="Test order via TradeBridge Nexus"
)
print(f"Order status: {response.status}")
# Expected: 'EXECUTED' or 'REJECTED' with reasonTradeBridge Nexus uses YAML-based configuration profiles for different trading scenarios. Each profile acts as a recipe book β pre-loaded with settings for specific strategies.
# scalper_config.yaml
profile:
name: "Aggressive Scalper"
risk_mode: "high_frequency"
max_spread_points: 5
file_bridge:
polling_interval_ms: 10
batch_size: 500
compression: "lz4"
encryption: false # Fast mode for local only
trading:
symbols:
- "EURUSD"
- "GBPUSD"
- "USDJPY"
default_lot: 0.01
max_risk_per_trade: 500 # USD
slippage_tolerance: 2
ai_assist:
enabled: false # Latency-critical, no AI
logging:
level: "ERROR"
retention_days: 1# swing_trader_config.yaml
profile:
name: "Positional Swing Trader"
risk_mode: "moderate"
max_spread_points: 15
file_bridge:
polling_interval_ms: 100
batch_size: 50
compression: "zstd"
encryption: true
signature_required: true
trading:
symbols:
- "XAUUSD"
- "BTCUSD"
- "SP500"
default_lot: 0.5
max_risk_per_trade: 10000
trailing_stop: true
take_profit_pips: 50
ai_assist:
enabled: true
provider: "claude" # Better for longer analysis
analysis_interval_minutes: 60
logging:
level: "VERBOSE"
retention_days: 90
include_screenshots: falseApply Profile:
python bridge_tool.py --config scalper_config.yamlTradeBridge Nexus provides a powerful CLI for both interactive and headless operation.
# Open trade
python bridge_tool.py trade \
--symbol EURUSD \
--action BUY \
--lot 0.1 \
--tp 1.1050 \
--sl 1.0980
# Check account balance
python bridge_tool.py account \
--info balance
# Monitor in real-time
python bridge_tool.py monitor \
--symbols EURUSD,GBPUSD \
--refresh 500
# Run AI analysis
python bridge_tool.py analyze \
--symbol XAUUSD \
--provider claude \
--output analysis.pdf
# Batch file processing
python bridge_tool.py batch \
--file orders_2026_01_15.csv \
--simulate
# Service mode (24/7)
python bridge_tool.py daemon \
--config scalper_config.yaml \
--log-file /var/log/tradebridge.log# Encrypted communication
python bridge_tool.py trade ... \
--encrypt \
--key-file /secrets/bridge.key
# Remote file bridge (network share)
python bridge_tool.py daemon \
--remote \\\\192.168.1.100\\bridge \
--auth windows
# Multi-instance manager
python bridge_tool.py orchestrate \
--instances 3 \
--symbols EURUSD:lot0.1,GBPUSD:lot0.5,XAUUSD:lot0.05Output Example:
[2026-01-15 14:23:01] TRADE | EURUSD | BUY 0.1 | Entry: 1.09234
[2026-01-15 14:23:02] CONFIRM | Order #142395 | Status: EXECUTED
[2026-01-15 14:23:02] ACCOUNT | Balance: $12,345.67 | Equity: $12,345.89
[2026-01-15 14:23:03] MONITOR | Spread: 0.8 pips | Volatility: LOW
TradeBridge Nexus doesn't just connect trades β it thinks about them. Our AI layer transforms raw market data into actionable wisdom, drawing from two distinct intelligence sources.
from tradebridge.ai import OpenAIAdvisor
advisor = OpenAIAdvisor(
api_key="sk-...", # Use environment variables in production
model="gpt-4-turbo",
context_window=1000, # Candles to analyze
risk_tolerance="conservative"
)
# Get trade recommendation
recommendation = advisor.analyze_market(symbol="EURUSD")
print(f"Signal: {recommendation.action} with confidence {recommendation.confidence}%")
print(f"Reasoning: {recommendation.analysis}")Key Capabilities:
- Pattern recognition across 50+ technical indicators
- Sentiment analysis from news and social media (via API)
- Historical backtesting integration β compare AI predictions to reality
- News-aware trading β GPT-4 reads and interprets central bank statements
from tradebridge.ai import ClaudeAdvisor
advisor = ClaudeAdvisor(
api_key="sk-ant-...",
model="claude-3.5-sonnet",
analytical_depth="deep"
)
# Risk assessment
risk_report = advisor.assess_portfolio_risk(
positions=[{"EURUSD": 0.5}, {"GBPUSD": -1.0}],
market_conditions=["high_volatility", "news_due"]
)
print(f"Portfolio VaR: {risk_report.var_95} USD")
print(f"Recommendation: {risk_report.action_plan}")Distinct Strengths:
- Long-form analysis β Claude provides narrative market reports
- Correlation discovery β identifies hidden relationships between assets
- Scenario modeling β "What if Fed cuts rates by 0.25%?" simulations
- Error detection β Claude audits your trading logic for flaws
# The "Two-Mind" approach
openai_advisor = OpenAIAdvisor(...)
claude_advisor = ClaudeAdvisor(...)
# Both analyze the same situation
openai_view = openai_advisor.analyze_market("BTCUSD")
claude_view = claude_advisor.analyze_market("BTCUSD")
# Consensus decision
if openai_view.action == claude_view.action:
execute_trade(openai_view.action)
print("Both AI models agree β proceeding with confidence 96%")
else:
print("AI divergence detected β pausing for human review")
log_analysis(openai_view, claude_view)TradeBridge Nexus comes with a web-based dashboard built on React and WebSockets. It's designed to be:
- Mobile-first β full trading capability from your phone
- Dark mode β reduce eye strain during night sessions
- Customizable widgets β drag-and-drop layout
- Real-time streaming β sub-second updates via WebSocket bridge
βββββββββββββββββββββββββββββββββββββββββββββββ
β π TRADEBRIDGE NEXUS β LIVE β Account: $12k β
ββββββββββββββββ¬βββββββββββββββ¬ββββββββββββββββ€
β Positions β Orders β Market Watch β
ββββββββββββββββΌβββββββββββββββΌββββββββββββββββ€
β EURUSD +0.5 β Pending: 2 β EURUSD 1.0923 β
β GBUSD -1.0 β Filled: 142 β GBUSD 1.2678 β
β XAUUSD +0.1 β Canceled: 3 β XAUUSD 2034.5β
ββββββββββββββββ΄βββββββββββββββ΄ββββββββββββββββ
β AI Insights: Bullish EURUSD (82% confidence)β
β Next News: FOMC minutes in 45min β° β
βββββββββββββββββββββββββββββββββββββββββββββββ
TradeBridge Nexus speaks your language β literally. The interface supports:
| Language | Code | Status | UI Coverage |
|---|---|---|---|
| πΊπΈ English | en |
β Complete | 100% |
| πͺπΈ Spanish | es |
β Complete | 100% |
| π«π· French | fr |
β Complete | 100% |
| π©πͺ German | de |
β Complete | 95% |
| π―π΅ Japanese | ja |
β Complete | 90% |
| π¨π³ Chinese (Simplified) | zh-CN |
β Complete | 85% |
| π·πΊ Russian | ru |
π In Progress | 60% |
| π¦πͺ Arabic | ar |
π In Progress | 40% |
Technical Implementation: The translation engine uses ICU message format with automatic detection via browser locale. Community contributions for new languages are welcome β see CONTRIBUTING.md for details.
Trading never sleeps, and neither does our support infrastructure. TradeBridge Nexus includes a comprehensive monitoring system that watches over your bridge like a vigilant lighthouse keeper.
# monitor_config.yaml
monitoring:
enabled: true
check_interval_seconds: 30
alerts:
- type: "CONNECTION_LOST"
action: "EMAIL"
recipient: "trader@example.com"
- type: "SLIPPAGE_EXCEEDED"
threshold: 5 # pips
action: "SMS+EMAIL"
- type: "DAILY_LOSS_LIMIT"
threshold: 2000 # USD
action: "STOP_ALL"
- type: "FILE_QUEUE_BACKLOG"
threshold: 1000 # unprocessed files
action: "RESTART_BRIDGE"
reporting:
daily_summary: true
weekly_analytics: true
monthly_audit: true| Channel | Response Time | Availability | Best For |
|---|---|---|---|
| π¬ In-app Chat | < 2 minutes | 24/7 | Quick questions |
| π§ Email | < 1 hour | 24/7 | Detailed inquiries |
| π Phone | < 5 minutes | Business hours | Urgent issues |
| ποΈ Ticket System | < 4 hours | 24/7 | Bug reports |
| π€ AI Assistant | Instant | 24/7 | FAQ & troubleshooting |
Service Level Agreements:
- Critical issues (trading stopped, data loss): 15-minute response
- High priority (order execution delays): 1-hour response
- Standard (configuration help): 4-hour response
- Low priority (feature requests): 48-hour response
TradeBridge Nexus employs defense-in-depth security:
- File encryption β AES-256-GCM for all trade commands
- Digital signatures β Ed25519 key pairs verify command origin
- Rate limiting β prevents accidental mass order creation
- Sandboxing β MQL5 server runs with minimal permissions
- Audit logging β every operation is timestamped and signed
- Environment isolation β test vs. production credentials separate
TRADING INVOLVES SUBSTANTIAL RISK OF LOSS. TradeBridge Nexus is a tool of empowerment, not a guarantee of profit. Past performance of any trading strategy does not guarantee future results.
The creators of TradeBridge Nexus:
- Do not provide financial advice
- Are not responsible for trading losses incurred through use
- Strongly recommend testing in demo environments before live use
- Advise consulting with a qualified financial advisor
Regulatory Compliance: This software is designed for educational and research purposes. Users are responsible for ensuring compliance with local financial regulations. The file-based architecture does not circumvent any regulatory requirements β it simply provides a technical bridge.
TradeBridge Nexus is released under the MIT License β a permissive free software license that allows for commercial use, modification, distribution, and private use. The only requirement is preservation of copyright and license notices.
Copyright (c) 2026 TradeBridge Nexus Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files...
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-idea) - Commit changes (
git commit -m 'Add amazing idea') - Push to branch (
git push origin feature/amazing-idea) - Open a Pull Request
Contribution Guidelines:
- All code must pass our security audit
- New features require test coverage > 80%
- Documentation updates for UI changes (multilingual)
- Respect the file-based protocol specification
Version 2026.1.0 | Build 1423 | Released January 2026
TradeBridge Nexus β Where Code Meets Capital, and Intelligence Meets Action.
Built for traders who demand transparency. Designed for algorithms that don't sleep.