
Category: Automation | Date: 2026-05-06
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.
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.
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" }
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.
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.
Never run a new automated strategy on a funded account without testing.
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.