2.23

📡 Sending TradingView Alerts to sTraderZ.com

Turn TradingView alerts into journal entries, signals or watchlist symbols via webhook

1. 🧭 What the Webhook Does

Many traders analyse their charts in TradingView and get notified there by an alert when a setup triggers. With the webhook, TradingView sends every alert straight to sTraderZ.com. Nothing has to be entered twice: the setup is in your journal before you place the trade, and the review happens later in the same place.

Target (type)What happens
journal (default)A private journal entry with symbol, price, direction, timeframe and your note. If sTraderZ.com knows the symbol, the entry gets a link to the chart. Tags are assigned and created if needed.
signalA notification through your signal channels: bell, push, email or Telegram, exactly as set under Notifications.
watchlistThe symbol is added to a watchlist: the one you name, otherwise your default watchlist, otherwise a new watchlist “TradingView”.

The feature belongs to the signals and is available from the Premium plan. You set everything up on the TradingView alerts page (profile menu).

2. ⚙️ Setting It Up Step by Step

  1. Create a token. On the TradingView alerts page, give the token a label (e.g. “Swing breakouts”) and create it. The token starts with stz_tv_ and is shown only once. Copy it right away. sTraderZ.com stores only a checksum and cannot show it to you again later.
  2. Open an alert in TradingView. Via the clock icon on the right or by right-clicking in the chart (“Add alert”). TradingView offers webhooks only on a paid plan, and requires two-factor authentication for them.
  3. Enter the message. Copy one of the templates from the settings page into the alert’s “Message” field. Right after creating a token, the page shows the template already filled with your token.
  4. Enter the webhook URL. Under “Notifications”, enable “Webhook URL” and paste the address from the settings page. It ends in /api/webhooks/tradingview.php.
  5. Save and check. As soon as the alert fires, the call appears in the reception log on the settings page, with a link to the created entry or with the reason for rejection.

It pays to create a separate token for each purpose: the log then shows which set of alerts caused which call, and you can revoke single tokens without changing all alerts. Up to ten tokens can be active at the same time.

3. 🧾 The Message: Fields and Templates

TradingView sends the text from the “Message” field unchanged to sTraderZ.com, after replacing the placeholders in double curly braces with the current values. If the message starts with {, it must be valid JSON, otherwise the alert is rejected. Any other text is taken over as the note of a journal entry; the token must then be in the webhook URL (?t=…).

{
    "token": "YOUR_TOKEN",
    "type": "journal",
    "symbol": "{{ticker}}",
    "exchange": "{{exchange}}",
    "interval": "{{interval}}",
    "price": "{{close}}",
    "time": "{{timenow}}",
    "action": "{{strategy.order.action}}",
    "note": "Breakout above resistance",
    "tags": [
        "breakout",
        "tv-alert"
    ]
}
FieldContentRule
tokenyour tokenRequired unless it is in the URL. It is safer in the message: addresses end up in server logs, messages do not.
typejournal, signal or watchlistdefault journal
symbol{{ticker}}letters, digits and . _ - ! / & ^ =, at most 40 characters. An exchange prefix such as NASDAQ:AAPL is split off. Required for signal and watchlist.
exchange{{exchange}}helps to match the symbol unambiguously
interval{{interval}}letters and digits, at most 10 characters
price{{close}}must be a number
time{{timenow}}at most 40 characters
action{{strategy.order.action}}one word, e.g. buy or sell. TradingView only fills this placeholder in strategy alerts; leave it out for ordinary price alerts. An unreplaced placeholder is ignored.
noteyour textat most 2,000 characters, HTML is removed
tagslist, e.g. ["breakout"]at most 5 tags made of letters, digits, spaces, - and _
watchlistname of a watchlistonly for watchlist; if it does not exist, the alert is rejected

Fields sTraderZ.com does not know are ignored. A field with the wrong type (e.g. a list instead of text), however, leads to rejection, so that nothing is processed halfway.

4. 📋 Reception Log and Error Reasons

The reception log on the settings page shows the last 50 calls: time, token, target, symbol, result and the received content (with the token in it masked). Entries are deleted after 30 days. Calls with an unknown or revoked token do not appear, because they cannot be assigned to a user.

With Send test alert above the log you send a sample alert for AAPL to a target of your choice. This checks whether the notification, journal entry or watchlist arrives before you set anything up in TradingView. The test appears in the log as “Test alert”. Whether your TradingView setup is right only shows with the first real alert.

ReasonMeaning and fix
Message starts with { but is not valid JSONUsually a quote or a comma is missing. Copy the template again.
Invalid value in field …The named field does not match the rule from the section above, e.g. a price containing text.
Symbol missingsignal and watchlist need symbol; a journal entry needs a symbol or a note.
No watchlist with this nameCheck the name in watchlist or leave the field out.
Your plan does not include signalsThe webhook is available from Premium.
Too many alerts within one minuteAt most 20 alerts per minute are processed per token. Often an alert that fires on every price tick is behind it; choose “Once per bar” in TradingView.
No signal channel enabledThe alert arrived, but no channel for signals is switched on under Notifications.
Symbol was already on the watchlistNot an error: a symbol is not added twice.

5. 🔒 Security and Limits

  • No orders, no trades. The webhook only creates journal entries, notifications and watchlist symbols. It can neither place orders nor change trades or positions.
  • The token is the key. TradingView cannot send custom headers or signatures. Anyone who knows your token can therefore send alerts on your behalf. Do not share it, and revoke it immediately if it has fallen into the wrong hands.
  • Rotating a token. Create a new token, enter it in the alert, then revoke the old one. Revoked tokens are rejected immediately.
  • Limits. At most 8 KB per message, 20 processed alerts per token and minute, 60 calls per sender address and minute. TradingView itself limits alerts as well.
  • Private. Journal entries from the webhook are always private and earn no ranking points. Afterwards you can edit and share them like any other entry.