Skip to content

Create a TradingView alert for ZB Connector

  • Time 10 min
  • Level beginner
View as Markdown

A ZB Connector alert is a TradingView alert with a Webhook URL and a JSON message that names your license and the command to run. This page shows how to set both up and how to check that the message is valid.

Before you start: a TradingView plan with webhooks and two-factor authentication switched on (requirements), and your license key.

  1. In TradingView, open the alert dialog for the chart or strategy you want to automate.

  2. In the alert’s notification options, tick Webhook URL and enter:

    https://dev.api.zb-connector.com/webhook/

    TradingView sends a POST request to this address every time the alert triggers. Webhooks only use port 80 or 443; this address uses the standard HTTPS port.

  3. In the message box, replace the text with a JSON command:

    Alert message
    {
    "license": "YOUR_LICENSE_KEY",
    "action": "long",
    "symbol": "EURUSD",
    "volume": 0.01,
    "positionID": "my_strategy_1"
    }
    • license is your license key. The field is called license.
    • action is the command to run. The commands overview lists them.
    • The other fields depend on the command: see its page in the cheat sheet.
  4. Create the alert and let it fire.

    What you should see

    The TradingView alert log shows the alert, and its Webhook status shows that the request was accepted. In the dashboard, Command History lists the command.

TradingView sends the message as application/json when it is valid JSON, and as text/plain otherwise. ZB Connector reads the body as JSON in both cases, so a message that is not valid JSON is refused with HTTP 400. Check these points:

  • Straight double quotes (") around every name and every text value, not curly quotes.
  • No comma after the last field.
  • Numbers such as volume and sl are not in quotes (numeric text such as "0.01" is also accepted).
  • positionID is text, so it is in quotes. A number there is rejected.
  • Your license key is spelled exactly as in the dashboard.
  • The message is one JSON object, not a list.

The webhook checks the license and the command before it queues anything. It answers HTTP 200 when the command is queued, which does not mean the trade ran. An invalid command is refused with HTTP 422 and a message that names the problem, and nothing is queued. TradingView cancels a request that takes longer than 3 seconds. All the replies are listed in webhook HTTP codes.

  • No row in the TradingView alert log: the alert did not fire. Check its condition and that it is active.
  • A row, but the webhook status is an error: find the code in webhook HTTP codes.
  • Webhook status is a success, but nothing in Command History: make sure the dashboard shows the license you used in the message.
  • Still stuck? Follow find where the alert stopped.

Use placeholders to fill values from the chart, then send a test alert.

Verified for EA v1.9 · dashboard 2026-10-05 · reviewed by Claude Code (owner review pending)

Report a problem with this page

Trading involves substantial risk of loss. ZB Connector is software only; it does not provide investment advice, signals or brokerage services.