TradingView to MetaTrader 5 Webhook Bridge
A production-oriented desktop bridge from TradingView webhooks to MetaTrader 5 execution.
Split agent/UI architecture with a SQLite write-ahead queue, dual-auth intake, event dedupe, and open/close/reverse execution.

- Split agent/UI architecture for a desktop bridge
- SQLite write-ahead-log queue for durability
- Dual-auth intake plus event-ID deduplication
- MT5 adapter executes open, close, and reverse commands
A production-oriented Windows desktop bridge that turns TradingView webhook alerts into MetaTrader 5 orders. It uses a split agent/UI architecture, with a SQLite write-ahead-log queue for durability, dual-auth webhook intake, and event-ID deduplication so a retried or duplicated alert never fires twice. The MT5 adapter executes open, close, and reverse commands.
The design tackles the real pain points of alert-to-broker automation on MT5: durability across restarts, authentication, and idempotency. It is a practical alternative to paid connector services, built to be run by an individual trader on their own machine. Durability across restarts and deduplication of repeated alerts are what separate a hobby script from something you can leave running against a funded account, which is the standard this bridge was built to.
Executes live broker orders; shared as engineering work, not financial advice. No profit is promised and users trade their own accounts at their own risk.
Update (2026): A second-generation self-hosted bridge pairs a FastAPI engine with a file-protocol Expert Advisor that verifies a shared protocol version at launch. Live-verified on a demo account: roughly 400 ms from webhook to broker on a BTCUSD round trip, and a stress run of 3,347 mixed webhooks in 23 minutes that produced 3,083 real opens with 3,083 unique tickets, zero lost orders, zero server errors, a 40-of-40 duplicate-storm dedupe, and a kill switch that held under load. A protocol-faithful broker simulator gives it a 20-case regression harness. Its grammar and EA were later lifted into the Skynet service.
How it works
- Webhook alert hits dual-auth intake
- Event ID checked to dedupe repeats
- Event persisted in SQLite write-ahead queue
- Agent picks it up and calls MT5 adapter
- Open, close, or reverse executed
Software and automation are infrastructure, not financial advice. No performance guarantees. Every live system needs staged testing, risk limits, and owner approval.