How to automate TradingView alerts

Autoview · Guide

By the end of this guide a TradingView alert will place a real order on your exchange on its own. You write the strategy and the alert that fires; Autoview is the piece in the middle that reads the alert and sends the matching order to your account. No screen to watch, no button to click when it triggers.

This is the canonical setup for TradingView. If you want the full platform walkthrough that covers every exchange, the web platform guide goes deeper. This page keeps the focus on the TradingView alert itself.

What "automating an alert" actually means

A TradingView alert can do more than email you. It can send a webhook: a small POST request to a URL of your choosing the moment the alert fires. Autoview gives you that URL. So the chain is short and it runs without you:

  • Your alert fires in TradingView.
  • TradingView POSTs the alert's message to your private Autoview webhook URL.
  • Autoview reads the command inside that message and places the order on your connected exchange.

The webhook runs on Autoview's servers around the clock, so nothing has to stay open on your machine. Close the laptop and a signal still executes. And while TradingView is the common sender, it isn't the only one: the same webhook accepts a POST from TrendSpider, a Python script, or your own server. The rest of this guide uses TradingView because that's what most people start with.

What you need first

Three things, and two of them are quick:

  • A TradingView alert that can send a webhook. Webhook notifications are part of TradingView's paid plans, so confirm your plan includes them on TradingView's side.
  • An Autoview account. Make a free account if you don't have one.
  • A connected exchange. Autoview executes through your exchange's API, so you connect it once with an API key. Pick yours from the exchange guides, where there's a step-by-step for OANDA, Tradovate, Kraken, Bybit, OKX, Coinbase, and more. When you create that key, grant trading and read access and never grant withdrawal, since no automation needs it.

New to all of this? Point your first setup at a demo or testnet connection. Several are free, and you can watch a fill happen end to end without real money on the line.

Step 1: Write the command your alert will carry

With Autoview, the alert's message body is the order. It's a short string of parameters: what to trade, which side, how much. A basic market buy reads like this:

s=BTCUSDT b=buy q=1 t=market

Symbol, direction, quantity, order type. From there you layer on the parts that manage risk: stop loss, take profit, trailing stops, limit prices. Those are all covered in the command reference and the full alert syntax page. If you'd rather not hand-write it, Autoview's Command Builder walks you through a short questionnaire and hands back the text to paste in.

One detail worth knowing now: symbol format is per-exchange. Bybit wants BTCUSDT; OANDA wants the underscored EUR_USD, not EURUSD. Match the format your exchange uses or the order won't fill.

Step 2: Create your Autoview webhook and copy its URL

A webhook is the private inbox your alerts post to. In Autoview, create one, then link it to the exchange connection from the step above so Autoview knows which account these alerts should trade on. The web platform guide covers the keys → webhook → link setup in full if you need it.

Autoview then gives you the webhook URL to copy. Keep it private, because anyone who has it can send your account a command. For an extra layer, you can set a key on the webhook (sent as ?key=yourkey on the URL, or as the first line of the alert message), so a stray request without it gets ignored.

Step 3: Paste the webhook into your TradingView alert

Now wire TradingView to that URL. Open or create your alert in TradingView, and in the alert dialog:

  • Go to the Notifications tab and turn on Webhook URL.
  • Paste your Autoview webhook URL from Step 2 into that field.
  • Put your command from Step 1 in the alert's Message box.

Save the alert. If your TradingView alert dialog offers a test option, use it before you trust a live signal, and check the next step regardless.

Step 4: Dry-run with d=1, then one small live test

This is the step people skip and then wonder at 3am why a live signal did nothing. Don't skip it. Before any real capital is on the line, add the dry-run flag d=1 to your command:

s=BTCUSDT b=buy q=1 t=market d=1

With d=1, Autoview reads the alert and writes to your log exactly what order it would have placed, without sending anything to the exchange. Fire the alert, open your event log in Autoview, and read the line. Right symbol? Right side? Right size? Good.

A clean dry run proves your syntax parses. It does not prove the whole path to your exchange. Only a live order does that. So drop the d=1, fire one small order just above the exchange's minimum size, confirm it lands in both the Autoview log and your exchange, then cancel it. That's the full round trip. (Prefer no real money yet? Run this against that free demo or testnet connection.)

It doesn't have to be TradingView

Everything above is the TradingView path because that's the common one, but the webhook itself is sender-agnostic. Anything that can POST to a URL works the same way: TrendSpider, a custom Python script, a cron job on your own server. Point it at the same webhook URL with the command in the request body, and Autoview reads it the same way it reads TradingView.

When an alert doesn't trade

Almost every problem shows up in the event log, so read it first. The usual suspects:

  • Nothing in the log. The alert never reached Autoview. Confirm the webhook URL in TradingView matches your Autoview URL exactly, and that any key you set is included. Re-fire the test.
  • The exchange rejected the order. The alert arrived but the exchange refused it, and the log carries the exchange's own response. Usually a wrong symbol format (see the EUR_USD note) or a size below the exchange's minimum.
  • Connection shows disconnected. Re-check the API key on the exchange: keys expire, get revoked, or were created read-only. Generate a fresh one and re-add it.

One more thing that trips people up: placeholders like {{close}} are TradingView's, not Autoview's. TradingView swaps in the real number when the alert fires, then Autoview just reads whatever value arrives. Send from a Python script and you'd insert the number its own way.

That's the whole loop: write the command, create the webhook, paste it into your TradingView alert, dry-run, then go live. Do it once and your alerts trade themselves while you do something else.

A note on what Autoview is. Autoview is an execution tool, not a trading or investment advisor. It places the orders your own alerts tell it to. It doesn't generate signals, recommend trades, or make any claim about results. Trading carries risk of loss, and you're responsible for the strategy you automate. See our disclosures.

Connect your exchange