Put this in the alert's Message field:
{
"action": "{{strategy.order.action}}",
"symbol": "{{ticker}}",
"price": {{close}},
"sl": 0,
"tp": 0,
"lots": 0.01
}Fields
| Field | Required | Meaning |
|---|---|---|
| action | yes | "buy", "sell" or "close". "close" closes the open position on that symbol. |
| symbol | yes | The instrument name as your broker spells it — XAUUSD, US30, EURUSD. |
| price | no | Entry price. 0 means execute at market. |
| sl | no | Stop-loss price. 0 omits it, subject to the completeness gate. |
| tp | no | Take-profit price. 0 omits it. |
| lots | no | Fixed size for this alert. Omit to let your risk rules size the trade. |
| comment | no | Free text stored with the trade. |
Two things that break it
- Invalid JSON. One missing comma, or a smart quote pasted from a document, and the whole payload fails.
- The broker's symbol name.
{{ticker}}gives TradingView's spelling, which is often not your broker's. Map it on the source if they differ.
Verifying
Fire the alert once, then open Settings → Advanced → TradingView Alerts → Recent alerts. Every inbound call is listed with instrument, direction and outcome — including the exact parser error if it was rejected.