Automation · Latency · Global

TradingView Webhook to MT5/Broker: The Real Latency, and When Automation Is (and Isn't) Right

An honest, engineer's breakdown of how long it actually takes a TradingView alert to reach your broker — where the seconds go, what you can control, and the strategies webhook automation is genuinely right for.

Automation · Latency · GlobalJune 14, 20268 min read
About the author

Jayadev Rana has built custom TradingView (Pine Script) and MetaTrader (MQL4/MQL5) systems since 2017 for retail traders, prop-firm traders and small funds worldwide. These guides come from real production work — webhook bridges, expert advisors, non-repainting indicators and broker/exchange execution. See the public Work section and video proof before you decide anything.

The bottleneck isn't your code or your VPS

TradingView's alert-send pipeline — tens of seconds, often 25-45s under load — is the dominant latency term, and no bridge or VPS can change it. Match the tool to your timeframe.

Every week someone asks me to wire a TradingView strategy to their MT5 or broker account, and the second question is always the same: "How fast is it?" Usually it's a scalper who wants alerts hitting their broker in milliseconds. I'd rather lose that job than sell a fantasy, so here's the truth I tell every client about TradingView webhook to MT5 latency — what it really is, where the time goes, and when this architecture is the right tool versus the wrong one.

Short version: a TradingView-webhook bridge is excellent for swing, intraday, and position strategies, and for executing discrete signals. It is not the right tool for ultra-low-latency scalping or tick arbitrage. The bottleneck isn't your code or your server — it's TradingView's own alert-send pipeline, which you do not control.

The end-to-end latency chain, honestly

"Latency" gets thrown around as one number, but it's actually a chain of separate stages, each with its own delay and its own owner. When you understand the chain, you stop optimizing the wrong link. Here's what actually happens between your candle closing and your order getting filled.

StageWhat happensRealistic timeWho controls it
1. Bar close / conditionYour alert condition evaluates. Non-repainting alerts fire on bar close, not intrabar0 ms (event), but you wait for the candle to closeYou (timeframe choice)
2. TradingView fires webhookTV's alert engine queues and dispatches the HTTP POST to your URL~tens of seconds; commonly ~25–45s under load, occasionally faster, occasionally slowerTradingView (not you)
3. Network to your serverPOST travels to your receiver endpoint~20–300 msPartly you (server location)
4. Your receiver processesParse JSON, validate secret, dedupe, decide action~1–50 ms (well-built)You
5. Broker/exchange API callYour server places the order via the broker API~30–300 msPartly you (VPS near broker)
6. FillBroker matches/routes the order, returns confirmationBroker-dependent, ~10–500 msBroker/liquidity

Look at the numbers. Stages 3 through 6 — everything you build and pay for — typically sum to well under a second when engineered properly. Stage 2 dwarfs all of it. TradingView's own send delay is the dominant term, and it is genuinely variable: I've seen alerts arrive in under ten seconds and I've seen them arrive close to a minute when the platform is under heavy load. No bridge vendor, no VPS, and no amount of clean code changes that, because it happens entirely inside TradingView's infrastructure before the POST ever leaves their building.

This is the single most important fact in the whole conversation, and it's the one most service pages quietly omit. If anyone promises you "sub-second TradingView automation" end-to-end, they're either misunderstanding the chain or hoping you don't.

What you actually control (and what you don't)

Once you accept that Stage 2 is fixed, your engineering effort goes into the links you do own. Here's where a competent build earns its money:

  • Server / VPS location. Host your receiver close to your broker's order-entry servers (for many MT5 brokers and FX/crypto venues, that's London, New York, or specific exchange regions). This shaves Stages 3 and 5. It does nothing for Stage 2 — a VPS does not make TradingView send faster.
  • A lean receiver. A tight Python or Node endpoint that parses, validates, and dispatches in single-digit milliseconds. No bloated frameworks doing synchronous logging on the hot path.
  • One strategy alert per ticker, not a swarm of indicator alerts. If you fire ten indicator alerts and reconcile them server-side, you've added round-trips and ambiguity. A single, self-contained strategy alert carrying the full instruction is faster and far more reliable.
  • Idempotency and dedup. TradingView can occasionally double-send. Without a dedup key you risk a double order. This isn't a speed feature — it's the feature that stops a glitch from doubling your position size.
  • Persistent broker session. Keep your broker/exchange API session warm so you're not re-authenticating on every signal. Cold auth can cost you a full second or more.

What you cannot control: TradingView's queue depth, their dispatch timing, and momentary platform congestion. You design around that variability — you don't eliminate it. I cover the practical build of this in my guide to building a custom TradingView-to-broker bridge, and the reliability patterns below matter more than raw speed for most real strategies.

The honest verdict: which strategies fit webhook automation

Match the tool to the timeframe. Here's how I advise clients before writing a line of code.

Webhook automation is a great fit for:

  • Swing and position trading — holds of hours to days. A 30-second send delay is rounding error on a 3-day hold.
  • Intraday strategies on 5m, 15m, 1h+ bars — where entries are defined at bar close and a few seconds of slippage is acceptable and backtestable.
  • Discrete signal execution — "when this confluence appears, take the trade with this risk." The signal matters, not the microsecond.
  • Multi-account / copy execution — fan one TradingView signal out to several broker accounts.

Webhook automation is the wrong tool for:

  • Ultra-low-latency scalping — strategies whose edge lives in seconds or sub-second entries. A 25–45s send delay can turn a winner into a loser before your order leaves the queue.
  • Tick / latency arbitrage — if your edge is being faster than someone else, a browser-platform webhook is structurally the wrong vehicle.
  • News-spike scalps — where price moves meaningfully within the very window TradingView is still holding your alert.

If you're in that second bucket, the answer isn't a faster bridge — it's no bridge at all. Which brings us to the alternative.

When you need real speed: native MT5 EA, no webhook hop

The fastest possible path is to skip TradingView's send pipeline entirely. A native MT5 Expert Advisor running on the chart evaluates your logic locally on every tick and places orders directly through the terminal — no alert queue, no HTTP POST, no third-party hop. Latency collapses to the EA's tick handler plus the broker round-trip, typically tens of milliseconds.

The trade-off is honest and worth stating: you give up TradingView's charting and Pine Script ergonomics, and the strategy logic has to be reimplemented in MQL5. That's a real porting job, and it's the job I do most often for scalpers and intraday traders who outgrew webhooks. If your strategy currently lives in Pine, I can convert your TradingView strategy to an MT5 EA so it runs natively on the chart with no webhook in the loop. For ground-up EA work, the MT5 EA development path is the right starting point.

ApproachRealistic latencyBest forTrade-off
TradingView webhook → broker bridge~tens of seconds (TV send dominates)Swing, intraday on 5m+, signal executionTV send delay is uncontrollable
Native MT5 EA on chart~tens of msScalping, intraday, tick-sensitive logicLogic must be rewritten in MQL5
Co-located VPS + native EALowest practicalLatency-sensitive, high-frequency executionCost + setup complexity

Architecting the webhook path for reliability, not just speed

For the strategies webhooks do suit, reliability beats raw speed every time. An order that arrives in 600 ms but occasionally fires twice, or fires after hours, is worse than one that's a hair slower but always correct. Here's the spine of a receiver I'd actually deploy — dedup, market-hours guard, persistent session, and logging:

from flask import Flask, request, abort
import hashlib, time

app = Flask(__name__)
SECRET = "your-shared-secret"
seen = {}  # dedup cache: signal_id -> timestamp

def is_market_open():
    # broker/instrument-specific guard; reject off-hours signals
    return True  # replace with real session logic

@app.post("/webhook")
def webhook():
    data = request.get_json(force=True)
    if data.get("secret") != SECRET:
        abort(403)                       # reject spoofed POSTs

    # idempotency: ignore duplicate sends within a window
    sig_id = hashlib.sha256(
        f"{data['ticker']}{data['action']}{data['bar_time']}".encode()
    ).hexdigest()
    if sig_id in seen and time.time() - seen[sig_id] < 60:
        return {"status": "duplicate_ignored"}, 200
    seen[sig_id] = time.time()

    if not is_market_open():
        return {"status": "market_closed"}, 200

    # place_order() uses a warm, persistent broker session + retries
    result = place_order(data["ticker"], data["action"], data["qty"])
    log(sig_id, data, result)            # always log for audit/debug
    return {"status": "ok", "order": result}, 200

Notice what's not in there: nothing trying to "speed up" TradingView. The value is in the guards. The secret check stops anyone who finds your URL from trading your account. The dedup key (ticker + action + bar time) means a double-send from TradingView places one order, not two. The market-hours guard drops stale or off-session signals. And logging every signal is what lets me debug "my alert didn't fire" — usually it did fire, just late, and the log proves where the seconds went. These patterns are the difference between a weekend script and a system you can trust with real size, and they're the same ones I lean on when building a fully custom alternative to off-the-shelf bridge tools like PineConnector.

"Why are my alerts delayed?" — the usual suspects

When a client says automation feels slow, it's almost never the broker. In order of likelihood: (1) TradingView's send delay under load — Stage 2, unfixable; (2) too many indicator alerts being reconciled instead of one clean strategy alert; (3) a receiver doing heavy synchronous work (re-auth, blocking logs) on the hot path; (4) a server geographically far from the broker. Only items 2–4 are yours to fix, and they typically save hundreds of milliseconds — meaningful, but they don't change the fundamental order of magnitude set by Stage 2.

So when you size up TradingView webhook to MT5 latency, hold two numbers in your head: the dominant, uncontrollable tens of seconds from TradingView's send pipeline, and the controllable sub-second everything-else that good engineering keeps tight. If your strategy can live with the first number, a webhook bridge is a clean, robust, cost-effective solution — and I build them as a focus of my TradingView automation work. If it can't, no bridge will save you, and you should be on a native EA. Telling you which side of that line you're on, honestly, before you spend a dollar, is the whole job — and if you want that read on your specific setup, that's exactly the conversation I have when you bring me a TradingView automation project.

Not sure if webhooks or a native EA fit your strategy?

Tell me your timeframe and broker, and I'll give you a straight answer on the right architecture — webhook bridge or native MT5 EA — before you spend a dollar. You get commented source code you own, milestone-based payment, and a developer who tells you when the answer is 'don't use a webhook.'

FAQ

How much latency does TradingView webhook to MT5 have?

The dominant delay is TradingView's own alert-send pipeline, which is realistically in the tens of seconds and commonly around 25-45 seconds under load. Everything you build and host — network to your server, the receiver, and the broker API call — typically sums to well under a second when engineered properly. So the honest end-to-end figure is mostly determined by TradingView, not by your code or VPS.

Is webhook trading too slow for scalping?

For true scalping or tick-sensitive strategies, yes. A 25-45 second send delay from TradingView can easily turn a profitable scalp into a loss before your order even leaves the queue. Scalpers should run a native MT5 EA on the chart instead, which executes locally in tens of milliseconds with no webhook hop.

How can I make TradingView automation faster?

You can shave the controllable links: host your receiver close to your broker's servers, keep the receiver lean, use a persistent (warm) broker session, and send one clean strategy alert per ticker instead of many indicator alerts. These help, but they only affect the sub-second portion — they cannot reduce TradingView's own send delay, which is the largest part of the chain.

Does a VPS reduce TradingView webhook latency?

A VPS reduces network latency between your server and the broker, which is useful, but it does not speed up TradingView's alert dispatch — that happens inside TradingView's infrastructure before the POST is ever sent. So a VPS helps the small, controllable part of the chain, not the large, uncontrollable part. Anyone claiming a VPS gives you sub-second end-to-end automation is misunderstanding where the time goes.

Webhook bridge vs native MT5 EA — which is faster?

A native MT5 EA is dramatically faster because it skips TradingView's send pipeline entirely and places orders directly from the terminal in tens of milliseconds. A webhook bridge is bottlenecked by TradingView's tens-of-seconds send delay. The trade-off is that the EA requires reimplementing your strategy logic in MQL5, whereas a webhook bridge can run your existing Pine strategy.

Why are my TradingView alerts delayed?

The most common cause is TradingView's send delay under platform load, which you cannot control. Other fixable causes are reconciling many indicator alerts instead of one strategy alert, a receiver doing heavy work (like re-authenticating) on every signal, and a server located far from your broker. Logging every received signal is the fastest way to prove whether the delay is on TradingView's side or yours.

Can you guarantee a specific execution speed for my strategy?

I can guarantee the parts I build are tight — a lean receiver, a server near your broker, and sub-second handling on my side. I cannot guarantee TradingView's send timing, because that lives inside their platform and varies with load. What I will do honestly is tell you, before you spend anything, whether your strategy's timeframe is a good fit for webhooks or whether you need a native EA instead.