Guide / Checked Nov 2026
How do I auto execute trades from a TradingView strategy?
Create the alert on your strategy() script with the condition set to Order fills only. Paste a Nyria webhook URL into Notifications and put {{strategy.order.action}}, {{ticker}} and the two position placeholders in the message. Every fill the strategy makes then reaches Nyria, and a bot places the order. TradingView sends webhooks on paid plans only. Test on Nyria Paper first.
Official documentation
Auto execute a strategy in six steps
- 1
Create the strategy in Nyria
Select Create strategy and pick TradingView as the alert source. Open the Integration tab and copy the webhook URL and the message.
- 2
Open the alert on your strategy
On the chart, press Alt+A and set the Condition to your strategy() script. Choose Order fills only, so one alert covers every fill.
- 3
Paste the message
Paste the message from the Integration tab. It carries {{strategy.order.action}}, {{ticker}}, {{strategy.market_position}} and {{strategy.prev_market_position}}. TradingView fills them in at each fill.
- 4
Add the webhook URL
Open Notifications, tick Webhook URL, paste the strategy's URL and select Apply, then select Create.
- 5
Check the format
Back in Nyria, select Check format. Nyria reads the two position fields and works out the action and direction from the change.
- 6
Deploy on paper first
Select Deploy bot, choose Nyria Paper and set a Budget per entry. Let the strategy fire for a week, then read the Logs tab against the chart.
Messages to copy
JSON message
{
"ticker": "{{ticker}}",
"action": "{{strategy.order.action}}",
"marketPosition": "{{strategy.market_position}}",
"prevMarketPosition": "{{strategy.prev_market_position}}",
"price": {{close}}
}Plain text message
{{strategy.order.action}} {{ticker}} @ {{close}}What the placeholders carry
- {{strategy.order.action}} is buy or sell.
- {{strategy.market_position}} is long, flat or short after the fill.
- {{strategy.prev_market_position}} is the position before the fill.
- Send both position fields and Nyria reads an entry, an exit or a reversal.
- {{strategy.order.contracts}} is reference only. Each bot sizes from its own Budget per entry.
Strategy or indicator
- The strategy placeholders exist only in a strategy() script.
- An indicator() has none, so it needs one message per side.
- Nyria attaches no stop order to an entry. A position closes when an exit alert arrives.
Questions
- Does an indicator work, or only a strategy?
- Both work. A strategy() script sends one Order fills only alert with the strategy placeholders. An indicator() needs one message per side.
- Why did my alert send the placeholder as text?
- An indicator alert has no strategy placeholders, so TradingView sends the braces as typed. Use a strategy() script, or write the side into each message.
- Who sets the order size?
- The bot does. The contracts in the message are reference only, and each bot sizes from its Budget per entry.
- Do I need a paid TradingView plan?
- Yes. TradingView sends webhooks on its paid plans only, with two-factor sign-in turned on. Nyria is free to test on paper.
- What does it cost?
- Paper is free. Live trading from $15 a month.
Next
- Paste an alert into the alert tester to see how Nyria reads it.
- Write a TradingView message with the alert builder.
- Step by step for one account: how to automate TradingView to Nyria Paper.
- Step by step for one account: how to automate TradingView to Alpaca.
- Nyria for developers.
Guides
Automate TradingView alerts to your broker
The alert, the webhook URL, the message, a paper test, then live.
Paper trade a TradingView strategy free
Nyria Paper runs up to 10 paper bots with simulated fills on live market data.
Can you trade directly from TradingView?
The trading panel places orders by hand. Alerts never place orders; the webhook route does.
TradingView webhook JSON format
TradingView sends the Message box as written. What it adds, and what Nyria needs the message to say.
TradingView alert placeholders
Every {{ticker}} and {{strategy.*}} placeholder, what it becomes when the alert fires.
Try a paper bot first
No card required. Paper is free. Live trading from $15 a month.