TradingView
Signal Source Integration
Connect your TradingView Pine Script strategies and indicators to Nyria. When your alerts fire, we execute trades automatically in your connected brokerage accounts.
TradingView Setup Tutorial
Critical: Repainting Warning
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
TradingView Webhook Delays
TradingView considers webhook delivery delays of 25-45 seconds normalduring high-traffic periods. This is outside Nyria's control. If you need faster execution, consider using real-time data feeds and custom webhook sources.
Step-by-Step Setup Guide
Create Your Strategy in Nyria
Log into Nyria and create a new strategy. Choose your equity type (stocks, options, or crypto) and configure your alert format.
strategy-create.png
Copy Your Webhook URL
After creating your strategy, copy the unique webhook URL from the strategy settings. This is where TradingView will send alerts.
webhook-url.png
Set Up TradingView Alert
In TradingView, right-click on your chart or indicator and select 'Add Alert'. Configure the condition that should trigger your trade.
tv-create-alert.png
Configure Webhook
In the alert dialog, check 'Webhook URL' and paste your Nyria webhook URL. Set the alert message to match your Nyria strategy format.
tv-webhook-config.png
Deploy Your Bot
Back in Nyria, create a bot that connects your strategy to your brokerage account. When TradingView fires an alert, Nyria executes the trade.
bot-deploy.png
Alert Message Examples
Copy these templates into your TradingView alert message. Variables like {{ticker}} are automatically replaced 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-06-19",
"type": "call"
}Buy to Open a call option contract.
Exit All
{
"ticker": "{{ticker}}",
"action": "exit"
}Close any open position for this ticker.
Pine Script Alert 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.
TradingView Plan Requirements
Webhook alerts require a TradingView Pro, Pro+, or Premium subscription. The free plan does not support webhook URL notifications.
View TradingView PricingOther Signal Sources
Ready to automate TradingView?
Connect your TradingView strategies to Nyria and start automating trades in minutes.