The TradingView alert

The exact message body, field by field.

Each strategy shows a ready-made alert message with its own passphrase already filled in — copy that rather than the sample below, which uses a placeholder. Paste the webhook URL into the alert's Webhook URL field and the message into the alert's message box.

Strategy alert
{
  "passphrase": "YOUR-PASSPHRASE",
  "ticker": "{{ticker}}",
  "action": "{{strategy.order.action}}",
  "sentiment": "{{strategy.market_position}}",
  "quantity": "{{strategy.order.contracts}}",
  "position_size": "{{strategy.market_position_size}}",
  "price": "{{close}}",
  "time": "{{timenow}}",
  "interval": "{{interval}}",
  "comment": "{{strategy.order.comment}}",
  "id": "{{timenow}}-{{strategy.order.id}}"
}
Indicator alert — fixed direction, no strategy placeholders
{
  "passphrase": "YOUR-PASSPHRASE",
  "ticker": "{{ticker}}",
  "action": "buy",
  "price": "{{close}}",
  "time": "{{timenow}}",
  "interval": "{{interval}}",
  "id": "{{timenow}}"
}

The fields

passphrase
Required. Wrong passphrase is rejected before anything else happens.
ticker
Required. The symbol as your chart names it.
action
buy, sell, long, short, exit, close, flat, cancel or add.
quantity
Optional whole number. contracts is accepted as the same field.
position_size
Optional. The position you want to end up holding — see below.
position / sentiment
long, short or flat. Both spellings are accepted because TradingView and other tools disagree.
price, sl, tp
Optional. sl is what dollar-risk sizing measures against.
id
Optional. Repeated ids are treated as the same signal, so a retry does not trade twice.
time, interval, exchange, comment
Optional. Recorded, not acted on.

Target position instead of an order

A normal alert says do this: buy two. An alert carrying position_size together with position says be this: end up long two. Tradeus then compares that with what the account actually holds and sends only the difference — so a duplicate alert changes nothing instead of doubling you up.

The strategy template above already sends both, using {{strategy.market_position}} and {{strategy.market_position_size}}. If you write your own message, keeping those two fields is the single best protection against a repeated alert.

Also in Strategies and signals