TRADINGVIEW ALERTS TO TRADE COPIER: Complete Integration Guide
TradingView has become the go-to charting platform for retail and professional traders alike, largely because of its flexible alert system. But an alert on its own is just a notification — it doesn't place a trade anywhere. To turn a TradingView alert into an actual executed position, you need a bridge between TradingView and your execution platform. That's exactly what the TopTrades trade copier does. This guide walks through how TradingView alerts connect to the TopTrades webhook endpoint, what the alert payload looks like, and everywhere that alert can ultimately be delivered — from live trade execution on platforms like NinjaTrader and MetaTrader, to instant notifications on Telegram, WhatsApp, and Discord.
- Why Connect TradingView to a Trade Copier?
- How TradingView Alerts Work
- Sample TradingView Alert Payload
- How the Webhook Connection Works
- Where the Alert Can Go: Execution and Notification Destinations
- Why This Matters for Signal Providers and Strategy Builders
- Best Practices When Setting Up TradingView Alerts for Trade Copying
- Risk Considerations With Automated Alert Execution
- Final Thoughts
Why Connect TradingView to a Trade Copier?
TradingView is excellent for building strategies, setting up custom indicators, and defining precise entry and exit conditions using Pine Script. What it isn't built for is direct trade execution across multiple platforms and brokers. Most traders who build strategies in TradingView are running them on charts, not on live trading accounts.
Connecting TradingView to a trade copier solves this gap. Instead of manually watching for an alert and placing the trade yourself, the alert is sent automatically to a webhook endpoint, which then handles execution or distribution based on however you've configured it. This removes human delay and error from the equation, and it means a strategy built once in TradingView can be deployed across several accounts, platforms, or notification channels simultaneously.
How TradingView Alerts Work
TradingView allows you to create alerts based on price conditions, indicator crossovers, or custom Pine Script strategy logic. When an alert condition is triggered, TradingView can send an automated message to a specified webhook URL. This is the mechanism that makes the entire integration possible — instead of the alert just popping up as a browser or mobile notification, it's transmitted as structured data to a server that can act on it.
That structured data is typically formatted as JSON (JavaScript Object Notation), a lightweight format that's easy for both humans and computers to read. The TopTrades trade copier is built to receive this JSON payload directly from TradingView's alert webhook and translate it into an executable trade instruction.
Alerts can be created in two main ways on TradingView. The first is a manual alert, set directly on a chart based on a price level, indicator condition, or drawing tool. The second, and far more powerful method for automated trading, is generating alerts directly from Pine Script — TradingView's built-in strategy scripting language. Pine Script allows traders to code their own custom indicators and strategies, and when a strategy's entry or exit condition is met, the script can trigger an alert automatically using Pine Script's built-in alert() function. This means the JSON payload sent to the TopTrades webhook can be generated dynamically by your own strategy logic, with fields like price, stop, limit, and size populated in real time based on the script's calculations, rather than being entered manually for every trade.
Sample TradingView Alert Payload
Below is an example of what a TradingView alert message looks like when formatted for the TopTrades webhook endpoint:
{
"client": "V9K4B2C3W7#1523",
"command": "OPEN",
"symbol": "XAUUSD",
"type": "BUY",
"id": 765932,
"time": 1744826307,
"market": 3328.11,
"price": 3328.11,
"stop": 3228.11,
"limit": 3428.11,
"size": 0.10
}
This JSON object contains everything the TopTrades trade copier needs to identify the account, the instrument, and the exact parameters of the trade. Here's a breakdown of what each field means:
| Field | Description |
|---|---|
| client | A unique identifier tied to the trader's TopTrades account and connected execution destination, used to route the alert correctly. |
| command | The action to take: "OPEN" new position, "CLOSE" existing position, or "MODIFY" existing position. |
| symbol | The trading instrument, in this case "XAUUSD" (gold vs. U.S. dollar). |
| type | The trade direction — "BUY" or "SELL." |
| id | A unique trade identifier generated for tracking and reference purposes. |
| time | A milliseconds since Epoch timestamp marking when the alert was generated. |
| market | The current market price at the time the alert was triggered. |
| price | The intended execution price for the trade. |
| stop | The stop-loss level for the trade. |
| limit | The take-profit or limit level for the trade. |
| size | The position size, expressed in lots (0.10 in this example). |
Once this JSON payload is generated by a TradingView alert, it's sent as an HTTP POST request to the TopTrades webhook URL, where it's parsed and acted on automatically.
How the Webhook Connection Works
Setting up the connection between TradingView and the TopTrades trade copier follows a straightforward process:
- Generate a unique webhook URL from your TopTrades account. This URL is what TradingView will send alert data to.
- Build your alert message in TradingView using the JSON structure shown above, filling in the relevant symbol, direction, price levels, and size for your strategy. This can be done manually for individual alerts, or dynamically using Pine Script variables so that fields like price, stop, and limit populate automatically based on your strategy's live calculations.
- Set the webhook URL in your TradingView alert settings so the JSON payload is delivered to TopTrades the moment the alert condition is triggered.
- TopTrades receives the payload at its webhook endpoint and validates the client ID, symbol, and trade parameters.
- The copier routes the trade to whichever execution destination or notification channel has been configured for that client ID.
Because the entire process is automated from the moment the alert fires, there's no manual intervention required between a strategy triggering in TradingView and a trade being placed or a notification being sent.
Where the Alert Can Go: Execution and Notification Destinations
One of the most flexible aspects of the TopTrades trade copier is that a single TradingView alert isn't limited to one destination. Depending on how your account is configured, the same alert payload can be routed to live trade execution, messaging platforms, or your own custom systems.
| Destination | What Happens |
|---|---|
| NinjaTrader | The alert is executed as a live trade directly on a connected NinjaTrader account, using the symbol, direction, size, and price levels from the JSON payload. |
| cTrader | The trade is placed automatically on a connected cTrader account, following the same parameters received in the alert. |
| MetaTrader (MT4/MT5) | The alert is converted into a live order on a connected MetaTrader account, including stop-loss and take-profit levels defined in the payload. |
| Interactive Brokers | The trade is routed and executed to the Interactive Brokers account via the IB API. |
| The alert is formatted into readable text and sent as a real-time trade notification to a WhatsApp number or group. | |
| Telegram | The alert can be delivered instantly to a Telegram channel or group, useful for signal providers distributing trade calls to followers. |
| Discord | Alerts can be posted directly into a Discord server or channel, formatted as a readable trade alert. |
| Websites | The alert payload can be forwarded to a website endpoint, allowing it to be displayed on a live feed, dashboard, or members-only page. |
| Custom-Built Trading Systems | For traders or firms running their own proprietary systems, the raw JSON payload can be forwarded to a custom endpoint for further processing or execution logic. |
This flexibility means the same TradingView strategy can serve multiple purposes at once — executing trades automatically on a funded account while simultaneously notifying subscribers on Telegram, without needing to build separate integrations for each destination.
Why This Matters for Signal Providers and Strategy Builders
For traders who build and sell trading signals, this kind of integration removes a major bottleneck. Rather than manually copying and pasting trade alerts into a Telegram channel, or manually placing the same trade across multiple platforms, the entire distribution process becomes automatic. A strategy built once in TradingView using Pine Script can simultaneously execute live trades and notify an entire subscriber base within milliseconds of the alert firing, with no manual steps in between.
This is especially valuable for signal providers managing followers across different platforms. Some followers may want fully automated execution on their MetaTrader or cTrader account, while others may simply want a notification on Telegram or Discord so they can place the trade manually. Because the TopTrades webhook can route a single alert to multiple destinations simultaneously, both types of followers can be served from the same TradingView strategy.
Best Practices When Setting Up TradingView Alerts for Trade Copying
- Test with a demo account first. Before connecting a live account, confirm that the alert payload is formatted correctly and that trades are executing as expected on a demo environment.
- Use Pine Script variables for dynamic fields. Hardcoding a single price or size limits the usefulness of the alert. Using variables for fields like price, stop, and limit ensures the alert reflects live strategy calculations rather than static values.
- Double-check your client ID. Since the client field routes the alert to the correct destination, an incorrect ID can result in a trade being sent nowhere, or to the wrong account.
- Monitor your webhook logs. Reviewing delivery logs helps confirm alerts are being received and processed correctly, especially when first setting up a new strategy.
- Account for symbol naming differences. Symbol formatting can vary between TradingView and different brokers or platforms, so it's worth confirming that "XAUUSD" or other symbols map correctly to the corresponding instrument on the receiving end.
Risk Considerations With Automated Alert Execution
Automating trade execution from TradingView alerts removes manual delay, but it also means mistakes in your alert logic or strategy code get executed just as quickly as correct signals. A few precautions are worth keeping in mind:
- Backtest and forward-test any Pine Script strategy thoroughly before connecting it to live execution.
- Set appropriate position sizing in the alert payload to match your account's risk tolerance, since automated execution won't adjust size on the fly.
- Always include stop-loss levels in the payload where possible, rather than relying on manual intervention after the trade is placed.
- Periodically review executed trades against the original alert conditions to confirm the strategy is behaving as intended over time.
These practices mirror the same discipline required in any form of automated or copy trading — the system can only be as reliable as the logic and risk parameters behind it.
Final Thoughts
With this TradingView to Trade Copier setup your alerts can be routed to various other platforms, turning your strategy into a fully automated execution and distribution system.
Still have questions? Post them in the Trading Forums and a member of our Trading Community or Support Team will answer.