Skip to content

TradingView alert message

What should a TradingView alert message say?

No fixed template required. Nyria reads the intent. The simplest form is three words: ticker, direction and open or close. JSON gives more control for limit orders. TradingView fills placeholders like {{ticker}} and {{strategy.order.action}} before sending the alert.

Simplest plain-text forms

Three words is enough. Nyria reads the ticker, the direction and the action from any natural phrasing.

Long entry

NVDA long entry

Short entry

NVDA short entry

Close long

Close NVDA long

Sentence form (also works)

Sold NVDA, closing the long

Price is optional: a market bot ignores it, and a limit bot set to Alert price uses it as the limit. Position size in the message is ignored: order size comes from the bot’s Budget per entry.

Using TradingView strategy placeholders

TradingView fills {{strategy.*}} values before sending. These are only available in a strategy() script, not an indicator().

Strategy plain text with placeholders

{{strategy.order.action}} {{ticker}} @ {{close}}

TradingView default strategy message (also works)

order {{strategy.order.action}} @ {{strategy.order.contracts}} filled on {{ticker}}. New strategy position is {{strategy.position_size}}

When to use JSON

Plain text handles most cases. Use JSON for limit orders, or when a downstream system needs structured data.

JSON entry

{ "action": "OPEN", "ticker": "{{ticker}}", "direction": "LONG" }

JSON exit

{ "action": "CLOSE", "ticker": "{{ticker}}", "direction": "LONG" }

For options, where your rules pick the contract, see the TradingView webhook JSON page.

Common mistakes

  • Expecting a price in plain text to turn a market bot into a limit bot: it does not. For a limit order from one alert, send JSON with order_type limit and a price.
  • Position size in the message overrides the bot: it does not. Size comes from its Budget per entry.
  • Strategy placeholders in an indicator: {{strategy.order.action}} only works in a strategy() script. In an indicator, write the direction directly.

Test your message

Paste any message into the alert tester to see the order it becomes before adding it to your alert. No account needed. Every alert field is in the webhook reference.

Questions

Does TradingView have a required alert message format?
No. Nyria reads the intent from any wording. The simplest form is three words: ticker, direction and open or close. JSON gives more control for limit orders.
What are the {{strategy.*}} placeholders?
TradingView fills {{strategy.order.action}}, {{strategy.market_position}} and similar fields with the strategy's values before sending the webhook. They are available only when a strategy() script fires the alert, not an indicator().
Can I put a price in my alert message?
Yes. Price is optional. A market bot ignores it. A limit bot set to Alert price uses it as the limit and refuses an alert without one. The bot sizes orders from its Budget per entry, not from the message.
When do I need JSON instead of plain text?
Use JSON for a limit order: add order_type and price. JSON also suits any system that needs structure. On options, JSON with action and direction is the exact form. Plain text is read too.

Run your TradingView alerts on a free paper bot

Trade and test free on paper. No card required.