Webhooks · TradingView · JSON
TradingView webhook to MT5: how an alert becomes a live order
18 Aug 2026 · Updated 13 Oct 2026 · 9 min read

A TradingView webhook is just an HTTP POST when an alert fires. The platform does not know MT5 exists. Your job is to put a machine-readable message in the alert, receive it on a URL you control, and let a local EA trade.
The message TradingView should send
Replace TradingView's default text. Strategy alerts should use {{strategy.order.action}} so both entries and exits work. PineConnector also accepts fills like order buy @ price filled on EURUSD.
{
"symbol": "{{ticker}}",
"action": "{{strategy.order.action}}",
"qty": 0.1,
"sl": 50,
"tp": 100,
"strategy_id": "{{strategy.order.id}}"
}action accepts buy, sell, close, closelong, closeshort, and the limit variants. sl / tp are distances in pips. Use sl_price / tp_price when you already have absolute prices. Optional mt5_login routes the signal to a specific terminal.
What happens after the POST
- The URL authenticates with your webhook secret. A wrong secret returns 401 and does not write a trade row.
- Expired plans and daily quotas reject with a clear error in the log.
- The payload is normalized, de-duplicated for 60 seconds, and mapped to an MT5 symbol.
- The signal is queued. The EA polls, marks it sent, places
CTrade, then acknowledges ticket, price, and profit.
Common failures (and the log line to expect)
- Missing action — price-crossing alerts need JSON with
action, not just a title. - No connected MT5 account — the EA is detached, the license key is wrong, or the terminal is offline.
- No MT5 mapping — Market Watch does not contain a match for that ticker. Confirm it on Symbol mapping.
- Kill switch — new entries are blocked on purpose until you turn it off under MT5 accounts.
Identical payloads within 60 seconds are treated as duplicates so a flapping alert does not double-fill. Change qty, action, or strategy_id if you truly need a second order.
Crypto destinations accept buy, sell, close, closelong, and closeshort as market orders. Limit-style actions are not sent to Delta Exchange or CoinDCX. See the setup guide for the alert box, or create an account to get a webhook URL.