A cross-platform Expert Advisor for MT4/MT5 that sends real-time trading metrics to Supabase via webhook.
-
Compile the EA:
- Open MetaEditor (F4 in MetaTrader)
- Open
SupabaseBridge.mq4(for MT4) orSupabaseBridge.mq5(for MT5) - Compile (F7) to generate
.ex4or.ex5files
-
Configure WebRequest URLs:
- Go to
Tools > Options > Expert Advisors - Enable "Allow WebRequest for listed URL"
- Add:
https://bhhrmriyuhqygmnzqjyr.supabase.co
- Go to
-
Set Parameters:
- Drag EA to chart
- Configure AccountID, UserID, and APIKey
- Enable live trading
-
Monitor:
- Check Journal tab for "✅ Data sent successfully"
- View data in your Supabase dashboard
SupabaseBridge.mq4- MT4 source codeSupabaseBridge.mq5- MT5 source codeEA_Installation_Guide.md- Detailed setup instructionsREADME.md- This overview
| Parameter | Description | Example |
|---|---|---|
| AccountID | Your unique account identifier | "fusion123" |
| UserID | Your Supabase user UUID | "uuid-string" |
| APIKey | Your MT_API_KEY from Supabase | "your-api-key" |
| SendIntervalSeconds | Data transmission frequency | 60 |
| SendOpenTrades | Include open positions | false |
| DebugMode | Enable detailed logging | true |
Account Metrics:
- Balance, Equity, Margin, Free Margin
- Profit/Loss, Growth, Drawdown
- Margin Level, Broker Info
Trade History:
- Last 50 closed trades
- Trade details (symbol, lots, prices, times)
- Profit/loss per trade
- Optional: Open positions
Platform Info:
- Auto-detects MT4 vs MT5
- Broker name and account details
- HTTPS encryption for all data transmission
- API key authentication
- No trading permissions (read-only)
- Local data processing only
Designed specifically for MetaTrader running natively on macOS:
- No VPS required
- No Windows dependencies
- Lightweight and memory-efficient
- Silent background operation
{
"account_id": "fusion123",
"user_id": "your-supabase-user-id",
"broker_name": "FusionMarkets",
"platform": "MT4",
"balance": 1234.56,
"equity": 1200.00,
"margin": 100.00,
"free_margin": 1100.00,
"margin_level": 1100.00,
"profit": -34.56,
"drawdown": 2.5,
"growth": 1.2,
"trades": [
{
"trade_id": "78910",
"symbol": "EURUSD",
"action": "buy",
"lots": 0.5,
"open_price": 1.09123,
"close_price": 1.09321,
"open_time": "2025-05-31T10:00:00Z",
"close_time": "2025-05-31T10:15:00Z",
"profit": 20.50,
"pips": 20,
"comment": "Scalp trade"
}
]
}Common Issues:
- WebRequest not allowed → Add URLs to whitelist
- HTTP 401 → Check API key
- No data in dashboard → Verify AccountID matches setup
Debug Steps:
- Enable DebugMode
- Check MetaTrader Journal
- Verify internet connection
- Test Supabase webhook manually
For issues:
- Check installation guide
- Review Journal/Experts tab
- Verify Supabase webhook status
- Test with debug mode enabled
Webhook URL: https://bhhrmriyuhqygmnzqjyr.supabase.co/functions/v1/mt-data
Header: X-API-KEY: your-mt-api-key