Start free
Documentation

TradingView webhook format

Configure the TradingView webhook URL, the alert payload and the command aliases accepted by TheConnector.

TradingView

TradingView webhook format

Configure the TradingView webhook URL, the alert payload and the command aliases accepted by TheConnector.

Updated 11 Apr 2026 00:21
Step 1 Create account
Step 2 Connect broker
Step 3 Paste webhook
Delivery status Received → Routing → ACK → Delivered

Goal

TradingView must send a command that TheConnector can route to the correct MT4, MT5 or cTrader account.

1. Copy the account webhook URL

Use the URL shown in Accounts.

  • Recommended format: https://webhook.theconnector.fr/YOUR_ACCESS_KEY
  • One trading account uses one access key
  • Keep the webhook URL and access key from the same account
Account webhook details screenshot
Copy the webhook URL and access key from the account details.

2. Use a compact one-line command

Market order examples:

  • buy,EURUSD,risk=1,sl=20,tp=40
  • long,XAUUSD,risk=2,sl=15,tp=30
  • sell,GBPJPY,risk=1,sl=25,tp=50
  • short,NAS100,risk=1,sl=40,tp=80

Accepted market aliases include buy / long and sell / short.

3. Pending, close and cancel commands

Examples:

  • buylimit,EURUSD,price=1.08050,risk=1,sl=1.07850,tp=1.08450
  • buystop,EURUSD,price=1.09100,risk=1,sl=1.08700,tp=1.09900
  • selllimit,GBPJPY,price=199.100,risk=1,sl=199.700,tp=198.200
  • sellstop,GBPJPY,price=198.250,risk=1,sl=198.800,tp=197.400
  • closelong,EURUSD
  • closeshort,GBPJPY
  • closelongshort,EURUSD
  • cancellong,EURUSD
  • cancelshort,GBPJPY

Snake case variants such as buy_limit, sell_stop, close_long and cancel_short are normalized by TheConnector.

4. JSON payloads are accepted too

Examples:

  • {"action":"buy","symbol":"EURUSD","risk":1,"sl":20,"tp":40,"source":"TradingView","id":"tv-eurusd-001"}
  • {"action":"closelong","symbol":"EURUSD","source":"TradingView","id":"tv-close-eurusd-001"}
  • {"action":"buylimit","symbol":"EURUSD","price":1.08050,"risk":1,"sl":1.07850,"tp":1.08450,"source":"TradingView","id":"tv-pending-eurusd-001"}

5. Field meaning

  • symbol is the TradingView symbol before broker mapping
  • risk is forwarded to the robot
  • sl and tp are stop loss and take profit values
  • price is only needed for pending orders

6. Price mode matters

The account price mode defines how the robot reads sl, tp and price.

  • Absolute price
  • Pips
  • Percentage
Account price mode screenshot
The price mode is saved on the account and used by the robot.

7. TradingView alert dialog

  • Fill Webhook URL
  • Keep the message on one line
  • Use a stable syntax between alerts
  • Prefer Once Per Bar Close when the strategy expects a closed candle
TradingView alert screenshot
TradingView alert dialog with webhook URL and one-line message.

8. Validate the first alert

  • Confirm the account is Live
  • Open Transactions when the active plan includes it
  • Otherwise use Orders and the robot panel as first feedback sources
  • Check whether the webhook was received, acknowledged by the robot or rejected