Nyria Docs

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

  1. Create your strategy in Nyria with TradingView as the alert source
  2. Complete strategy configuration and validation
  3. Copy your webhook URL from the Integration tab
  4. 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 spy

Or 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:

SymptomWhat's Happening
Perfect entries on historical chartSignals moved to optimal locations after the fact
Buy signal appears, then disappearsSignal was based on incomplete bar data
90% backtest win rate, live trading lossesHistorical 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

  1. Using security() incorrectly - Requesting higher timeframe data without proper lookahead settings
  2. Not waiting for bar close - Signals fire before the bar confirms, then change
  3. Using real-time data in calculations - Calculations change as bar develops
  4. 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

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

  1. Link your Discord account in Nyria Integrations
  2. Invite the Nyria bot to your Discord server
  3. Create a strategy with Discord as the alert source
  4. 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 entry
close short btc
SPY 675C buy to open

For options with External Selection, specify strikes:

SPY 675C/676C bull call spread

Expiration 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

  1. Link your Telegram account in Nyria Integrations
  2. Create a strategy with Telegram as the alert source
  3. 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 entry
close short btc
SPY 675C buy to open

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

TrendSpider

TrendSpider integration is live.

Connect TrendSpider alerts directly to Nyria.

Setup

  1. Create strategy with TrendSpider as alert source
  2. Copy webhook URL from Integration tab
  3. In TrendSpider, configure alert webhook with your URL
  4. 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

  1. Create strategy with Custom as alert source
  2. Copy your webhook URL from Integration tab
  3. 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:

  1. Provide example alerts for each enabled trade type
  2. System validates parsing and execution logic
  3. Simulates full trade lifecycle
  4. 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

FeatureTradingViewDiscordTrendSpiderCustom API
Setup DifficultyEasyEasyEasyModerate
Options SupportInternal OnlyInternal or ExternalInternal OnlyInternal or External
Natural LanguageNoYesNoNo
Structured DataJSONTextJSONJSON
Real-timeYesYesYesYes

Next Steps