DEV Community

Sean Tolino
Sean Tolino

Posted on • Originally published at signalbridge.dev

How to Automate TradingView Alerts into Live Trades with SignalBridge

TradingView is one of the most popular charting platforms in the world. Millions of traders use it every day to build strategies, set alerts, and analyze markets. But there's a gap between getting an alert and actually executing a trade -- you still have to open your broker, enter the order manually, and hope you didn't miss the move.

SignalBridge closes that gap. It connects your TradingView alerts directly to your brokerage account and executes trades automatically. No code required.

In this guide, you'll go from zero to a fully automated trading pipeline in under 5 minutes. We'll use Alpaca (paper trading) as the example broker, but the same steps apply to Coinbase, Kraken, Robinhood, and Tradier.

The flow: TradingView alert fires → webhook hits SignalBridge → trade executes on your broker.

Prerequisites

Before you start, make sure you have:

  • A TradingView account with a paid plan (Plus, Premium, or Expert). Webhook alerts are not available on TradingView's free plan.
  • A brokerage account with one of the supported brokers. For this tutorial, we'll use Alpaca's free paper trading account.
  • Your broker's API key and secret. In Alpaca, you can generate these from the dashboard under Paper Trading → API Keys.

Step 1: Create a SignalBridge Account

Head to SignalBridge and create a free account. The free plan includes 25 alerts per month -- more than enough to test your setup. No credit card required.

After signing up, you'll land on the dashboard. This is where you'll manage your broker connections, webhooks, and execution history.

Step 2: Connect Your Broker

New Connection form

Navigate to Dashboard → Connections → New Connection.

  1. Select Alpaca as the broker.
  2. Choose Paper for the environment (we'll switch to live later).
  3. Paste your API Key and Secret Key from the Alpaca dashboard.
  4. Give the connection a name (e.g., "Alpaca Paper") and click Save.

Your API keys are encrypted at rest and are only decrypted at the moment of trade execution. SignalBridge never stores credentials in plaintext.

Step 3: Create a Webhook

webhook created

Go to Dashboard → Webhooks → New Webhook.

  1. Select the Alpaca Paper connection you just created.
  2. (Optional) Set a passphrase for extra security. If set, every incoming alert must include a matching passphrase field.
  3. (Optional) Add a ticker allow-list to restrict which symbols this webhook can trade (e.g., only AAPL, TSLA).
  4. Click Create. You'll see your unique webhook URL -- it looks something like:
https://api.signalbridge.dev/wh/a1b2c3d4-e5f6-7890-abcd-ef1234567890
Enter fullscreen mode Exit fullscreen mode

Copy this URL. You'll paste it into TradingView in the next step.

Step 4: Configure a TradingView Alert

Open TradingView and navigate to any chart. We'll set up an alert that fires a webhook to SignalBridge whenever your condition is met.

4a. Open the alert dialog

Click the alarm clock icon in the toolbar or press Alt+A. Set your alert condition as you normally would (e.g., "AAPL crosses above the 50-day SMA").

4b. Enable the webhook

Switch to the Notifications tab. Check the "Webhook URL" box and paste your SignalBridge webhook URL.

4c. Set the message body

In the Message field, replace the default text with a JSON payload. Here are common templates:

Buy 10 shares of AAPL:

{
  "ticker": "AAPL",
  "action": "buy",
  "qty": 10
}
Enter fullscreen mode Exit fullscreen mode

Buy $500 worth (notional order):

{
  "ticker": "AAPL",
  "action": "buy",
  "notional": 500
}
Enter fullscreen mode Exit fullscreen mode

Dynamic -- uses TradingView's built-in variables:

{
  "ticker": "{{ticker}}",
  "action": "{{strategy.order.action}}",
  "qty": {{strategy.order.contracts}}
}
Enter fullscreen mode Exit fullscreen mode

With passphrase (if you set one on your webhook):

{
  "ticker": "AAPL",
  "action": "buy",
  "qty": 10,
  "passphrase": "your-secret-here"
}
Enter fullscreen mode Exit fullscreen mode

Limit order (required for options outside market hours):

{
  "ticker": "AAPL",
  "action": "buy",
  "qty": 5,
  "order_type": "limit",
  "limit_price": 185.50
}
Enter fullscreen mode Exit fullscreen mode

Options contract (call option with limit order):

{
  "ticker": "AAPL",
  "action": "buy",
  "qty": 1,
  "option_type": "call",
  "strike_price": 190,
  "expiration": "2026-03-21",
  "order_type": "limit",
  "limit_price": 3.50
}
Enter fullscreen mode Exit fullscreen mode

Tip: Use the dynamic {{ticker}} variable so one alert template works across multiple symbols. Pair this with TradingView's strategy order variables for fully automated strategy execution.

Click Create to save the alert. The next time this condition triggers, TradingView will send the JSON payload to your SignalBridge webhook, and the trade will execute on your Alpaca account.

Step 5: Test with Paper Trading

Before risking real money, always test your setup with paper trading. Here's how to verify everything works:

  1. Go to your webhook in the SignalBridge dashboard and click the Test button.
  2. Send a test payload (e.g., buy 1 share of AAPL).
  3. Check the History page -- you should see the execution with a SUBMITTED status.
  4. Verify in your Alpaca paper account that the order was placed.

If something isn't working, check the execution history for error details. Common issues include mismatched passphrases, incorrect API keys, or tickers not on the allow-list.

Step 6: Monitor Your Executions

Execution history view

Every trade SignalBridge executes is logged in your History page with full details:

  • Timestamp -- exactly when the alert was received
  • Ticker & action -- what was traded and in which direction
  • Status -- SUBMITTED, CLOSED, or SKIPPED
  • Latency -- time from alert received to order submitted
  • Order ID -- the broker's order reference for reconciliation

SignalBridge is position-aware. If you send a buy signal for a ticker you already hold, it accumulates (adds to your position). If you send a sell signal with no position, it skips the trade instead of erroring out. This prevents duplicate orders and handles strategy reversals cleanly.

Going Live

Dashboard overview

Once you've tested your setup and you're confident in your strategy, switching to live trading is simple:

  1. Create a new connection with your live broker credentials (Alpaca Live, or any other supported broker).
  2. Edit your existing webhook and reassign it to the live connection -- your webhook URL stays the same, so no changes needed in TradingView.

That's it. Same JSON payload, same alert logic -- now with real trades.

Important: Start with small position sizes when going live. Monitor your first few executions closely to make sure everything behaves as expected. Trading involves risk of loss.

Next Steps

Now that your automation pipeline is running, here are a few ideas to explore:

  • Multiple webhooks -- run different strategies on separate webhooks with different brokers or settings.
  • Ticker allow-lists -- restrict each webhook to specific symbols so strategies don't interfere with each other.
  • Options trading -- add option_type, strike_price, and expiration to your payload to trade options contracts on Alpaca or Tradier.
  • Limit orders -- use order_type: "limit" with a limit_price for precise entries, especially for options outside market hours.
  • Crypto automation -- connect Coinbase or Kraken and automate your crypto strategies the exact same way.
  • Telegram notifications -- get instant push notifications for every trade on your phone, or broadcast signals to a Telegram channel. Available on the Unlimited plan.
  • Custom scripts -- SignalBridge webhooks work with any HTTP client, not just TradingView. Trigger trades from Python scripts, Zapier, or any automation platform.

Check out the full documentation for payload format details, execution logic, and troubleshooting tips.


Originally published at signalbridge.dev/blog

Top comments (0)