etrink← Home

TradingView Webhook Integration

Last updated: July 2026

Turn your TradingView alerts into live orders automatically. When your alert fires, TradingView sends a webhook to etrink, and our EtrinkAgent executes the buy/sell on your MT5 account — 24/7, even while your computer is off.

How it works

TradingView alert → etrink webhook (validates key, symbol & volume limits) → command queue → EtrinkAgent on your MT5 terminal → your broker. Every signal is logged in your panel.

Step-by-step setup

  1. In your panel open Webhook, pick the account to bind, and click + New key.
  2. Copy the webhook URL shown once (keep it secret — it can place orders):
https://api.etrink.com/hooks/etrk_xxxxxxxxxxxxxxxx
  1. In TradingView, create an Alert. Enable Webhook URL and paste the URL above.
  2. Paste the JSON below into the alert Message field:
{
  "action": "buy",
  "symbol": "EURUSD",
  "volume": 0.01,
  "sl": 0,
  "tp": 0,
  "id": "{{time}}"
}
  1. Save. When the alert triggers, the order is executed on your bound account.

Message format

FieldRequiredDescription
actionyesbuy · sell · close
symbolyesBroker symbol (e.g. EURUSD, XAUUSD)
volumenoLot size. Subject to your per-account volume limit.
sl / tpnoStop-loss / take-profit price (0 = none)
idnoIdempotency key — the same id is never executed twice
testnotrue = validate only, no real order

Examples

Sell

{ "action": "sell", "symbol": "XAUUSD", "volume": 0.05 }

Close an open position

{ "action": "close", "symbol": "EURUSD" }

Dynamic values (TradingView placeholders)

TradingView replaces {{ticker}}, {{strategy.order.action}}, {{close}} and more at send time:

{ "action": "{{strategy.order.action}}", "symbol": "{{ticker}}", "volume": 0.01 }

Pine Script example

Use the alert() call so the message (your JSON) is sent to the webhook when conditions are met:

//@version=5
strategy("etrink signal", overlay=true)

fast = ta.sma(close, 10)
slow = ta.sma(close, 30)

if ta.crossover(fast, slow)
    strategy.entry("Long", strategy.long)
    alert('{"action":"buy","symbol":"EURUSD","volume":0.01}',
          alert.freq_once_per_bar_close)

if ta.crossunder(fast, slow)
    strategy.close("Long")
    alert('{"action":"close","symbol":"EURUSD"}',
          alert.freq_once_per_bar_close)

Test safely

Add "test": true to any message (or use the Test signal button in the panel). All checks run, the event is logged as test, but no real order is placed.

Security & reliability. A key can be bound to a single account, so its signals only affect that account. If that account is stopped, the next incoming signal automatically restarts it — so your automation keeps running. Never share your webhook URL.

Troubleshooting

  • “symbol not allowed” — the symbol isn't in your allow-list, or the name differs at your broker (e.g. EURUSD.m).
  • “no running instance” — the bound account is stopped; it will auto-restart, then resend.
  • Volume rejected — above your per-account limit; lower the volume or raise the limit.
  • Every call appears under Webhook → recent events with the raw JSON so you can debug quickly.

Need help? [email protected]