Skip to content

Guide

Automate TradingView options alerts

Nyria automates options trading from a TradingView alert: send an alert naming the ticker, open or close, and long or short, and Nyria places the order at Charles Schwab, Alpaca, tastytrade or Tradier. Alert to order, sub-second. Long uses the call rule saved on your strategy, short the put rule, as a single leg or a spread of up to 4 legs. Run it on Nyria Paper first.

Official documentation

Send an options alert from TradingView

  1. 1

    Create an options strategy

    In Nyria, select Create strategy and pick TradingView as the alert source. Choose options as the asset type and set what an entry and an exit do on each side. Set each leg's call or put, strike and expiry range there. Up to 4 legs, one expiration.

  2. 2

    Write the options message

    Name the ticker and the direction. LONG uses the strategy's call rule and SHORT its put rule.

  3. 3

    Create the alert in TradingView

    Open the alert dialog and set the Condition to your strategy or indicator. Open Message, paste the message and select Apply. Open Notifications, tick Webhook URL, paste the strategy's URL and select Apply, then Create. TradingView sends webhooks on its paid plans only, with two-factor sign-in on.

  4. 4

    Check the format

    Back in Nyria, select Check format, then Check and save. The strategy turns Active once Nyria reads every side, and the Logs tab shows the contract it picked.

  5. 5

    Run it on Nyria Paper

    Select Deploy bot, choose Nyria Paper and set a Budget per entry. Let the alert fire for a few sessions and check each order on the Logs tab.

  6. 6

    Deploy a bot on your broker

    Deploy a second bot and pick the Charles Schwab, Alpaca, tastytrade or Tradier account. Exits match the entry, leg for leg.

Trade a vertical call spread from a TradingView alert
Buy the call at your delta and sell the call one strike above it. Each entry alert opens the whole spread.

Messages to copy

A call entry, as JSON

{ "ticker": "SPY", "action": "OPEN", "direction": "LONG" }

A put entry, as JSON

{ "ticker": "SPY", "action": "OPEN", "direction": "SHORT" }

The call exit

{ "ticker": "SPY", "action": "CLOSE", "direction": "LONG" }

What an options alert can build

  • Single calls and puts, long or sell to open.
  • Vertical spreads, iron condors and iron butterflies, straddles and strangles: up to 4 legs on one expiration, every leg the same quantity.
  • Ratio spreads, calendars and diagonals are not supported.
  • 0DTE expirations on SPX, SPY, QQQ and IWM. SPX options go to Charles Schwab, tastytrade and Tradier, not Alpaca.
  • Alpaca stops new orders on contracts expiring that day after 3:15 pm ET, or 3:30 pm ET for broad-based ETFs such as SPY and QQQ. Nyria skips such an entry.

What to know before it trades

  • An alert cannot set the size. The bot sizes each order from its Budget per entry.
  • Exits come from your exit alerts.
  • Your broker needs options approval for the trade. At tastytrade, defined-risk spreads need a margin account with the Basic options permission or higher.
  • An options alert outside market hours is refused, not queued, and the log says so.

Questions

Can a TradingView alert carry the strike and expiry?
No. A TradingView strategy picks its contract from its own leg rules. Nyria drops any strike, expiry or legs the alert sends. To name each leg, send from Discord, Telegram or your own script. Set the strategy to Provided in alert.
What if the alert names no expiration?
A TradingView alert never names one. The strategy's own rules pick it, 0 to 31 trading days out.
Which brokers trade the options?
Charles Schwab, Alpaca, tastytrade and Tradier. Alpaca trades options but not SPX.
What does it cost?
Paper is free. Live trading from $15 a month.

Next

Try a paper bot first

No card required. Paper is free. Live trading from $15 a month.