TradingView to MT5 Webhook Automation in Sub-300ms
Execute Pine Script strategy and indicator alerts directly into MetaTrader 5 broker terminals without paying for a Windows VPS. Clean JSON payloads, automatic lot sizing, and tick-accurate fills.
How the Webhook Pipeline Works
From TradingView alert trigger to MetaTrader 5 broker fill in 3 simple steps.
Connect MetaTrader 5
Download TradeLynk's native MQL5 Expert Advisor from your dashboard and attach it to any chart in MT5. Zero complex DLLs or firewall reconfiguration required.
Set Webhook URL
Open your TradingView strategy or indicator alert settings, enable the 'Webhook URL' option, and paste: https://api.tradelynk.io/v1/webhook.
Paste JSON Payload
Use our interactive payload generator below to customize your order type, dynamic risk %, SL, and TP, then paste the generated JSON snippet into your alert message box.
Interactive Webhook Payload Builder
Select your trade structure, tweak parameters, and copy the validated JSON payload directly into your TradingView alert message.
Configure your strategy variables below to build the payload.
{
"token": "YOUR_TRADELYNK_WEBHOOK_TOKEN",
"action": "BUY",
"symbol": "EURUSD",
"lots": 0.5,
"sl_pips": 25,
"tp_pips": 50,
"comment": "TradeLynk_Signal"
}https://api.tradelynk.io/v1/webhookSub-15ms Ingestion GuaranteedZero Configuration for Broker Suffixes (.pro, .raw, .m, _i)
The Common Problem:
TradingView uses standard symbols like EURUSD, XAUUSD, or US30. However, Forex brokers append proprietary suffixes (e.g. IC Markets uses EURUSD.raw, Exness uses EURUSDm, FTMO uses US30.cash).
How TradeLynk Solves It:
TradeLynk's cloud router inspects your connected MT5 terminal's active market watch in real-time. Incoming alerts with standard names are instantly mapped to your broker's exact instrument identifier with zero manual scripting or code updates.
Embedding TradeLynk Webhook in Your Pine Script
Use the native alert() function with alert.freq_once_per_bar_close to trigger trades on candle closure.
//@version=5
strategy("TradeLynk Automated Trend Strategy", overlay=true, margin_long=100, margin_short=100)
fastEMA = ta.ema(close, 9)
slowEMA = ta.ema(close, 21)
longCondition = ta.crossover(fastEMA, slowEMA)
shortCondition = ta.crossunder(fastEMA, slowEMA)
if (longCondition)
strategy.entry("Long", strategy.long)
// Send TradeLynk Webhook JSON
alert('{"token":"YOUR_TOKEN","action":"BUY","symbol":"' + syminfo.ticker + '","lots":0.5,"sl_pips":25,"tp_pips":50}', alert.freq_once_per_bar_close)
if (shortCondition)
strategy.entry("Short", strategy.short)
alert('{"token":"YOUR_TOKEN","action":"SELL","symbol":"' + syminfo.ticker + '","lots":0.5,"sl_pips":25,"tp_pips":50}', alert.freq_once_per_bar_close)
Integration & Execution FAQs
Common questions on configuring TradingView webhooks with MetaTrader 5.
Start Executing TradingView Alerts in Sub-300ms
Join hundreds of algo traders executing millions in volume. Connect your MT5 broker in 60 seconds.