TradingView
Alert source
Paste a strategy's webhook URL into a TradingView alert and change nothing else. When the alert fires, Nyria reads it, picks the contracts and places the order in the brokerage account you connected.
Repainting indicators will burn you
Repainting indicators show different signals historically than they fired in real-time. This is dangerous for automated trading because backtests will look profitable, but live trading will fail.
Common causes of repainting:
- Using
security()to fetch higher timeframe data withoutlookahead=barmerge.lookahead_off - Using
request.security()without proper settings - Calculating signals on the current bar before it closes
- Using future data inadvertently through indicator logic
Delivery time is TradingView's, not ours
Nyria's clock starts when the alert arrives. How long TradingView takes to send it's outside our control and can stretch when the market is busy. If that matters to your strategy, post to the webhook from your own service instead.
Setting it up
Create the strategy in Nyria
Log into Nyria and create a new strategy. Choose your equity type (stocks, options, or crypto) and configure your alert format.
Copy the webhook URL
After creating your strategy, copy the unique webhook URL from the strategy settings. This is where TradingView will send alerts.
Create the TradingView alert
In TradingView, right-click on your chart or indicator and select 'Add Alert'. Configure the condition that should trigger your trade.
Tick Webhook URL and paste
In the alert dialog, check 'Webhook URL' and paste your Nyria webhook URL. Set the alert message to match your Nyria strategy format.
Deploy the bot
Back in Nyria, create a bot that connects your strategy to your brokerage account. When TradingView fires an alert, Nyria executes the trade.
Alert message examples
None of these are required. TradingView's own default sentence works as written, and so does a line of plain text like long entry SPY. These are here because some people prefer to be explicit. Placeholders like {{ticker}} are filled in by TradingView.
Stock entry
{
"ticker": "{{ticker}}",
"action": "buy",
"price": {{close}}
}Simple stock buy alert with ticker and price.
Options entry (BTO)
{
"ticker": "SPY",
"action": "BTO",
"strike": 450,
"expiry": "2026-12-18",
"type": "call"
}Buy to Open a call option contract.
Exit
{
"ticker": "{{ticker}}",
"action": "exit"
}Close any open position for this ticker.
Pine Script example
//@version=5
strategy("My Automated Strategy", overlay=true)
// Your strategy logic here
longCondition = ta.crossover(ta.sma(close, 14), ta.sma(close, 28))
shortCondition = ta.crossunder(ta.sma(close, 14), ta.sma(close, 28))
if (longCondition)
strategy.entry("Long", strategy.long)
alert('{"ticker": "' + syminfo.ticker + '", "action": "buy"}', alert.freq_once_per_bar_close)
if (shortCondition)
strategy.close("Long")
alert('{"ticker": "' + syminfo.ticker + '", "action": "exit"}', alert.freq_once_per_bar_close)Important: Use alert.freq_once_per_bar_close to prevent multiple alerts on the same bar.
You need a paid TradingView plan
Webhook notifications are a paid TradingView feature. The free Basic plan doesn't send them, so a paid plan is what makes the alert reach Nyria at all. Check the current tiers on their pricing page before you buy.
TradingView pricingOther alert sources
Point a TradingView alert at Nyria
The webhook URL goes in the alert box. The message keeps the wording it already has.