Menu

1 / 2

How I Cut My TradingView-to-MT5 Bridge Latency from 12 Seconds to 187ms

DEV Community·parrifever6999-sudo·7 months ago
#75f6BYZ1
#trading#python#flask#architecture#software
Reading 0:00
15s threshold

TradingView is where most retail traders build strategies. MetaTrader 5 is where most brokers execute trades. The gap between them is a webhook — and filling that gap reliably at low latency turned out to be a surprisingly deep engineering problem.

I'm the solo founder of SignalForge AI, a TradingView to MT5 bridge SaaS. This post covers the architecture decisions, the bugs that cost real money, and the latency optimization that took execution from 12 seconds to 187ms (p50).

The architecture in 30 seconds

TradingView Alert (webhook) | v Flask on Railway (US East) - Authenticate token - Parse signal (3 formats) - Route to broker account(s) - Store in PostgreSQL | v MT5 Expert Advisor (on client PC) - Polls /ea/poll/<token> every 500ms - Picks up pending signal - Executes on broker - Reports back to /ea/ack

Enter fullscreen mode

Exit fullscreen mode

No WebSockets. No message queue. Just HTTP polling.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.