Alert Sources
Connect different alert sources to trigger your automated trading strategies.
Alert sources are where your trading signals originate. Nyria supports multiple alert sources, each with unique setup requirements and capabilities.
Your Responsibility: You are solely responsible for ensuring your alerts are:
- Non-repainting - Alerts should not change after being triggered
- Properly tested - Always validate thoroughly with paper trading first
- Consistent - Signal formats should be stable and predictable
- Timely - Alert delays from your source are outside Nyria's control
Nyria cannot verify the quality, accuracy, or reliability of your alert sources. Signal sources shown in this documentation are independent third parties—we are not affiliated with or endorsed by them, nor do we endorse them.
TradingView
Automate alerts from your TradingView scripts and indicators.
Setup
- Create your strategy in Nyria with TradingView as the alert source
- Complete strategy configuration and validation
- Copy your webhook URL from the Integration tab
- In TradingView, create an alert with:
- Webhook URL: Your Nyria webhook URL
- Message: Your alert format (validated in Nyria)
Alert Format
TradingView alerts can be simple text:
long entry spyOr structured JSON:
{
"action": "open",
"direction": "long",
"instrument": "SPY"
}Or using the default TradingView alert format for backtesting strategies.
TradingView Variables
Use TradingView's built-in variables in your alerts:
{{ticker}}- Automatically replaced with the instrument{{close}}- Current close price{{time}}- Alert timestamp
Provide your alert, with variables, to our validation section in your Strategy's Integration tab. Nyria will fill in the variables intelligently and confirm proper handling of each alert type.
Options Strategies
TradingView strategies MUST use Internal Selection for options due to TradingView's limited option data access. Configure your option selection parameters in the strategy settings.
TradingView Repainting Warning
Critical: Many TradingView strategies "repaint"—meaning they show different signals on historical bars than they showed in real-time. Repainting strategies will NOT perform live as they appear in backtests. This is the #1 cause of "my backtest was profitable but live trading loses money."
What is Repainting?
Repainting occurs when an indicator or strategy changes its signals on historical bars after the fact:
| Symptom | What's Happening |
|---|---|
| Perfect entries on historical chart | Signals moved to optimal locations after the fact |
| Buy signal appears, then disappears | Signal was based on incomplete bar data |
| 90% backtest win rate, live trading losses | Historical signals never existed in real-time |
Why This Matters for Automation
A strategy that shows 90% win rate in backtest may:
- Never fire the same signals in real-time
- Fire at completely different prices or times
- Result in significant losses when automated
Nyria cannot detect or prevent repainting. You are solely responsible for ensuring your TradingView code does not repaint.
Common Causes of Repainting
- Using
security()incorrectly - Requesting higher timeframe data without properlookaheadsettings - Not waiting for bar close - Signals fire before the bar confirms, then change
- Using real-time data in calculations - Calculations change as bar develops
- Lookahead bias - Using future data not available at signal time
How to Avoid Repainting
1. Use barstate.isconfirmed
// Only fire alerts on confirmed bar closes
if barstate.isconfirmed
alertcondition(buySignal, "Buy Signal")2. Avoid lookahead in security() calls
// Wrong - can cause repainting
higherTF = security(syminfo.tickerid, "D", close, lookahead=barmerge.lookahead_on)
// Correct - avoids repainting
higherTF = security(syminfo.tickerid, "D", close[1], lookahead=barmerge.lookahead_off)3. Test in real-time for at least 2 weeks
Run your strategy without automation and manually record signals as they fire. Compare to what the historical chart shows later.
Resources for Detecting Repainting
- PineCoders: How to Avoid Repainting (security)
- PineCoders: How to Avoid Repainting (non-security)
- TradingView Docs: Indicator Repainting
- Zen and the Art of Trading: Eliminate Repainting
TradingView Webhook Delays
TradingView considers webhook delays of 25-45 seconds to be normal. Delays of 60+ seconds can occur during high-traffic periods. Design your strategy to tolerate these delays.
TradingView webhooks can be delayed by:
- 2-5 seconds (normal)
- 25-45 seconds (TradingView considers this "normal")
- 60+ seconds (high traffic periods)
Implications:
- Don't use sub-minute timeframes if seconds matter
- Build in buffer time for your strategy logic
- Monitor for missed alerts during volatile periods
Discord
Automate alerts from Discord servers you manage.
Setup
- Link your Discord account in Nyria Integrations
- Invite the Nyria bot to your Discord server
- Create a strategy with Discord as the alert source
- Configure Discord settings:
- Server - Select your Discord server
- Channel - Which channel to monitor
- Author (optional) - Filter by specific user
- Keyword (optional) - Filter messages containing text
Alert Format
Discord alerts are parsed from natural language:
spy long entryclose short btcSPY 675C buy to openFor options with External Selection, specify strikes:
SPY 675C/676C bull call spreadExpiration Handling
External-selection option strategies can be set to assume the next available expiration, otherwise you must provide it in the alert.
Best Practices
- Use a dedicated alerts channel
- Keep alerts concise and clear
- Include instrument, direction, and action
- For exits, match the language used in entries
Telegram
Automate alerts from Telegram channels or groups.
Setup
- Link your Telegram account in Nyria Integrations
- Create a strategy with Telegram as the alert source
- Configure Telegram settings:
- Channel/Group - Select which to monitor
- Author (optional) - Filter by specific user
- Keyword (optional) - Filter messages containing text
Alert Format
Telegram alerts work similarly to Discord, parsed from natural language:
spy long entryclose short btcSPY 675C buy to openBest Practices
- Use a dedicated alerts channel
- Keep alerts concise and clear
- Include instrument, direction, and action
- For exits, match the language used in entries
TrendSpider
TrendSpider integration is live.
Connect TrendSpider alerts directly to Nyria.
Setup
- Create strategy with TrendSpider as alert source
- Copy webhook URL from Integration tab
- In TrendSpider, configure alert webhook with your URL
- Format alerts similar to TradingView
TrendSpider integration follows similar patterns to TradingView. Use Internal Selection for options strategies.
Custom API
Custom API integration is live, including a "Dedicated" endpoint for even faster executions.
Send alerts from your own code or trading system via REST API.
Setup
- Create strategy with Custom as alert source
- Copy your webhook URL from Integration tab
- Send POST requests to the webhook URL
API Format
Send JSON payloads:
{
"instrument": "SPY",
"action": "OPEN",
"direction": "LONG",
"price": "450.50"
}For options with external selection:
{
"instrument": "SPY",
"action": "OPEN",
"direction": "LONG",
"legs": [
{
"strike": 675,
"side": "CALL",
"expiration": "2026-02-17",
"action": "buy_to_open"
}
]
}Authentication
Webhook URLs include a unique token hash for security. Keep your webhook URL private.
Rate Limiting
Custom API endpoints have rate limiting to prevent abuse. Contact support if you need higher limits.
Broker Orders (Coming Soon)
Create strategies from orders placed in your broker account, allowing other users to copy your manual trades automatically.
Alert Validation
Regardless of source, all strategies require alert validation:
- Provide example alerts for each enabled trade type
- System validates parsing and execution logic
- Simulates full trade lifecycle
- Strategy activates once validation passes
What Gets Validated
- Alert parsing extracts correct instrument, action, direction
- Option selection finds valid contracts (for options)
- Limit order pricing calculates correctly
- Exit alerts match entry positions
- All required fields are present
Common Validation Issues
"Could not parse instrument"
- Ensure instrument name is clear (SPY, BTC, etc.)
- Check spelling and formatting
"No option contracts found"
- Strike may be invalid or unavailable
- Check DTE range includes available expirations
- Verify delta/price targets are reasonable
"Price required for limit order"
- Strategy configured for alert-specified price
- Include price in your alert
"Multiple pairs selected"
- For crypto with both USDT/USDC pairs
- Specify exact pair in alert (BTCUSDT not just BTC)
Signal Source Comparison
| Feature | TradingView | Discord | TrendSpider | Custom API |
|---|---|---|---|---|
| Setup Difficulty | Easy | Easy | Easy | Moderate |
| Options Support | Internal Only | Internal or External | Internal Only | Internal or External |
| Natural Language | No | Yes | No | No |
| Structured Data | JSON | Text | JSON | JSON |
| Real-time | Yes | Yes | Yes | Yes |