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 options legs and 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 in the message is fine and ignored. Position size in the message is ignored too: order size comes from the bot’s Budget per entry, not from the alert.

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 options legs, limit orders, or when a downstream system needs structured data.

JSON entry

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

JSON exit

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

For options with a contract in the alert, see the TradingView webhook JSON page.

Common mistakes

  • Price in the message sets the order price: it does not. The bot uses market or limit order type from its settings, not a price you type.
  • 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.

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 options legs and 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, and Nyria ignores it. The bot sizes orders from its Budget per entry, not from a price in the message. Writing NVDA long here 228 works fine.
When do I need JSON instead of plain text?
Use JSON when you want to name an options contract in the alert (add a legs array), when sending a limit order (add order_type and price), or when a downstream system needs a structured format. Plain text is fine for stock and crypto entries and exits.

Run your TradingView alerts on a free paper bot

Trade and test free on paper, forever. No card required.