Skip to content

Guide

How to automate options trading from TradingView alerts

Put the option in the alert message and send the alert to a Nyria strategy by webhook. Nyria reads the ticker, the side, the strike, the expiry and call or put, and places the order in your Charles Schwab, Tradier, tastytrade or Alpaca account: a single leg, or a spread up to 4 legs sent as one order. Leave the contract out and the strategy picks one from its own rules. 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. For a spread, set its legs on the strategy, up to 4 on one expiration.

  2. 2

    Write the options message

    Name the ticker and the side. For a specific contract add the strike, the expiry and call or put, as below. Leave them out and the strategy's own rules pick an expiration 0 to 31 trading days out.

  3. 3

    Create the alert in TradingView

    Open the alert dialog, set the Condition to your strategy or indicator and paste the message in the Message box. In Notifications, select Webhook URL, paste the strategy's URL and select 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 read each order on the Logs tab against the alert behind it.

  6. 6

    Deploy a bot on your broker

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

Messages to copy

An options entry, as JSON

{ "ticker": "SPY", "action": "BTO", "strike": 775, "expiry": "2026-12-18", "type": "call" }

The exit

{ "ticker": "SPY", "action": "STC" }

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, Tradier and tastytrade, not Alpaca.

What to know before it trades

  • An alert cannot set the size. The bot sizes each order from its Budget per entry.
  • Nyria attaches no stop or take-profit order to an entry, so a position closes when an exit alert arrives.
  • Your broker needs options approval at the level the trade requires. Defined-risk spreads need level 3 or higher at tastytrade.
  • 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?
Yes. Put the strike, the expiry and call or put in the message, as plain text or JSON. TradingView fills in placeholders before it sends the alert.
What if the alert names no expiration?
The strategy's own rules pick one 0 to 31 trading days out. A contract named in the alert can be any listed expiration.
Which brokers trade the options?
Charles Schwab, Tradier, tastytrade and Alpaca. Alpaca trades options but not SPX.
What does it cost?
Paper is free. Live trading from $15 a month.

Next

Test the strategy on a paper bot first

Paper is free. Live trading from $15 a month.