If you use TradingView for charting, indicators, or automated strategies but execute your trades in NinjaTrader, webhook alerts provide an easy way to automate your trading.
TradingView can send a JSON-formatted webhook message whenever one of your alerts is triggered. Instead of simply sending an email or mobile notification, the webhook is delivered instantly to a server that can interpret the alert and submit the corresponding order to your trading platform.
Example JSON-formatted webhook message:
Code: Select all
{
"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
}
The TopTrades Trade Copier has webhook endpoints specifically designed to receive TradingView webhook alerts. Once configured, TradingView alerts can be translated into market orders, limit orders, stop orders, position closes, and other supported actions within NinjaTrader. This allows you to automate trades generated by TradingView strategies without manually entering orders.
A typical TradingView to NinjaTrader setup looks like this:
- Create a TradingView alert (or create an alert with Pinescript).
- Configure the alert to send a webhook JSON formatted request.
- Point the webhook URL to your TopTrades webhook endpoint.
- Include the order information (buy or sell, symbol, quantity, etc.) in the alert message.
- When the alert triggers, the TopTrades Trade Copier receives the webhook and immediately submits the order to NinjaTrader (or to any other trading system or platform).
If you're using TradingView with NinjaTrader or another trading platform, feel free to share your webhook setup, ask questions, or discuss how to structure TradingView alerts for automated trade execution using the TopTrades Trade Copier.