How to Set Up TradingView Alerts for Automated Futures Trading

How to Set Up TradingView Alerts for Automated Futures Trading

Category: Automation | Date: 2026-05-06

Automate Your TradingView Strategy

TradingView has the best charting and scripting tools in the world. But until you connect those alerts to a broker, your strategy is just a pretty chart. This guide walks you through setting up TradingView alerts that execute real futures trades automatically — no coding required beyond basic Pine Script.

What You Need

Step 1: Write Your Pine Script Alert Condition

Your Pine Script needs to define when to enter and exit. Here is a simple moving average crossover example:

//@version=5 strategy("MA Crossover", overlay=true) fast = ta.sma(close, 9) slow = ta.sma(close, 21) longCondition = ta.crossover(fast, slow) shortCondition = ta.crossunder(fast, slow) if longCondition strategy.entry("Long", strategy.long) if shortCondition strategy.entry("Short", strategy.short)

This strategy enters long when the 9-period SMA crosses above the 21-period SMA, and short on the crossunder.

Step 2: Create the Alert in TradingView

Right-click on the chart and select "Add Alert." Set the condition to trigger on your strategy's entry or exit.

In the alert message field, write a JSON payload that Signal Trade App can parse:

{ "action": "buy", "symbol": "MNQ1!", "quantity": 1, "orderType": "market" }

Step 3: Enable the Webhook URL

In your Signal Trade App dashboard, go to API → Webhooks and copy your unique webhook URL. Paste this URL into the TradingView alert's "Webhook URL" field.

When the alert fires, TradingView sends the JSON payload to Signal Trade App. The platform validates the signal, applies your risk rules, and places the order on your connected account within milliseconds.

Step 4: Add Bracket Orders

Market orders without stops are dangerous. Include stop-loss and take-profit fields in your webhook payload:

{ "action": "buy", "symbol": "MNQ1!", "quantity": 1, "orderType": "market", "stopLoss": 20, "takeProfit": 40 }

Signal Trade App attaches the bracket order automatically. The stop and target distances are measured in ticks by default.

Step 5: Test Before Going Live

Never run a new automated strategy on a funded account without testing.

  1. Create a demo alert that fires on a known condition (e.g., market open)
  2. Verify the webhook reaches Signal Trade App in the API logs
  3. Place a 1-contract test trade on a micro contract
  4. Check that the bracket order copies correctly to all follower accounts
  5. Run for one full week before scaling position size

Common Mistakes

Signal Trade App includes automatic duplicate order detection and max quantity limits to catch these errors before they reach the market.

The best automated strategy is one you fully understand. Test every line of your Pine Script before trusting it with real capital.

Related Reading