Connecting TradingView via webhook: how to structure the payload

From TradingView alerts to an MT5 order: how webhooks work, how to structure payloads, and which mistakes to avoid. The end-to-end path from TradingView alerts to your own MT5 is covered in TradingView to MT5.

2026-04-30

What a webhook is, in practice

A webhook is an HTTP call TradingView sends automatically when an alert fires. Instead of pushing a phone notification, TradingView sends a structured message to a web address you define - in our case, the signal intake endpoint of your Valuera instance.

Structuring the alert payload

TradingView allows free-form alert message bodies, typically in JSON. The minimum information for correct execution is: symbol, direction (buy/sell), and ideally reference price, stop loss, and take profit. TradingView dynamic variables - such as close price or strategy values - can be inserted directly in the message template.

An operational recommendation: keep payloads minimal and delegate risk rules to the execution platform. Position sizing calculated inside Pine Script does not know your MT5 account's real equity; the execution layer does.

Security and reliability

Every webhook endpoint should be protected by a secret token, so only alerts from your configuration are accepted.

Finally, always test the complete flow on a demo account before going live: the chain alert -> webhook -> validation -> order has more links than it appears, and each link should be verified once, thoroughly.

Loading