This trading bot automatically places your trading orders by receiving signals (alerts) from TradingView via webhooks. It works with three brokers—Tradier, Alpaca and Tradovate—to execute trades based on the details you provide in your TradingView alerts.
1. Receiving Alerts: When you set up an alert on TradingView, a message (in JSON format) is sent to the bot. This message includes all the essential details—such as which broker to use, whether to buy or sell, which stock (ticker) to trade, and how many shares.
2. Checking the Details: The bot ensures all required information is present and even checks if the market is open (based on EST) unless you're in testing mode.
4. Logging and Notifications: To keep you informed, the bot sends updates and error messages to Discord using dedicated webhooks. You'll receive a confirmation when a new trading signal is processed as well as any error notifications.
5. Extra Features: The bot can also close or liquidate positions automatically if needed. It even supports after-hours trading.
Desktop MCP Server: For traders who prefer complete control over their trading infrastructure, we offer a local MCP (Model Context Protocol) server that transforms Claude Desktop into a powerful trading assistant. This desktop solution runs entirely on your computer, ensuring complete privacy while providing direct access to your Tradovate account. The local server enables sophisticated features including bracket orders with take profit and stop loss capabilities, auto-trailing stops with configurable triggers, real-time market data, and automated position management. All data remains secure on your local machine with no cloud dependencies. Installation is straightforward with comprehensive documentation and support for both demo and live trading environments. This solution is ideal for experienced traders who want AI-powered automation with complete control over their execution and data.
Vercel MCP Server: For developers and traders seeking scalable, cloud-based automation without infrastructure management overhead, our Vercel-hosted MCP server provides multiple integration endpoints including full MCP protocol support, REST webhooks for TradingView integration, server-sent events for real-time updates, and direct messaging APIs. This serverless solution handles WebSocket connection pooling, authentication token management, and API rate limiting automatically. The hosted version supports complex order types, advanced risk management features, and includes Discord integration for execution logging and analysis. With stateless design and environment-based account routing, it's perfect for building custom trading dashboards, integrating with Pine Script strategies, or developing AI-powered trading systems. The service requires no infrastructure maintenance and offers transparent pricing based on usage, making it accessible for both individual traders and development teams. see https://tradovatemcp.vercel.app/ for feature list and example configurations
Use this webhook URL (https://webhooknextjs.vercel.app/api/webhook
) for your TradingView alerts. Modify at least two JSON signals—one for buy and one for sell. Replace the account ID and token with your own Account ID and Access Token in the JSON examples below, then paste the appropriate JSON into your TradingView alert message box based on your indicator's buy or sell signal.
Buy Signal for Tradier
{ "Broker": "Tradier", "Action": "buy", "Ticker": "{{ticker}}", "Quantity": "10", "LimitPrice": "{{close}}", "Tradier_Account_ID": "VA712334962", "TradierAccessToken": "GQkjksJLASKuefDfhUiOISBSWKwT" }
Sell Signal for Tradier
{ "Broker": "Tradier", "Action": "sell", "Ticker": "{{ticker}}", "Quantity": "10", "LimitPrice": "{{close}}", "Tradier_Account_ID": "VA712334962", "TradierAccessToken": "GQkjksJLASKuefDfhUiOISBSWKwT" }
Buy Signal for Alpaca
{ "Broker": "Alpaca", "Action": "buy", "Ticker": "{{ticker}}", "Quantity": "100", "LimitPrice": "{{close}}", "API_KEY": "PKEMWB0ZCZACMDSGZYMD", "API_SECRET": "itAed9eJwDjVIb34JIieiNLTpySKnL3cnfacPIey" }
Sell Signal for Alpaca
{ "Broker": "Alpaca", "Action": "sell", "Ticker": "{{ticker}}", "Quantity": "100", "LimitPrice": "{{close}}", "API_KEY": "PKEMWB0ZCZACMDSGZYMD", "API_SECRET": "itAed9eJwDjVIb34JIieiNLTpySKnL3cnfacPIey" }
Buy Signal for Tradovate
{ "Broker": "Tradovate", "Action": "buy", "Ticker": "MNQM5", "Quantity": "1", "TakeProfitPoints": "100", "StopLossPoints": "100", "LimitPrice": "{{close}}", "Username": "Google:108111111111", "Password": "Password111111", "AppId": "future", "APP_VERSION": "0.0.1", "CLIENT_ID": "5908", "CLIENT_SECRET": "5adsdf0-df05-49ae-a38a-7a0sdsd330d", "DeviceId": "e8sdsd0fe-b238-9995-e9c9-6b4423sd2964", "AccountID": "21111112", "IsLive":"False" }
Sell Signal for Tradovate
{ "Broker": "Tradovate", "Action": "sell", "Ticker": "MNQM5", "Quantity": "1", "TakeProfitPoints": "100", "StopLossPoints": "100", "LimitPrice": "{{close}}", "Username": "Google:108111111111", "Password": "Password111111", "AppId": "future", "APP_VERSION": "0.0.1", "CLIENT_ID": "5908", "CLIENT_SECRET": "5adsdf0-df05-49ae-a38a-7a0sdsd330d", "DeviceId": "e8sdsd0fe-b238-9995-e9c9-6b4423sd2964", "AccountID": "21111112", "IsLive":"False" }
Buy Signal
{ "Broker": "Tradovate", "Action": "buy", "Ticker": "MNQM5", "Quantity": "1", "TakeProfitPoints": "25", "StopLossPoints": "100", "LimitPrice": "{{close}}", "AccountID": "21111112", "IsLive":"True" }
Sell Signal
{ "Broker": "Tradovate", "Action": "sell", "Ticker": "MNQM5", "Quantity": "1", "TakeProfitPoints": "25", "StopLossPoints": "100", "LimitPrice": "{{close}}", "AccountID": "21111112", "IsLive":"True" }
Important Notice on Tradovate Futures Trading:
Please note that Tradovate futures trading is currently available only through demo (paper) accounts. The JSON signals sent to the bot include sensitive credentials. If you require a private webhook server for enhanced security during live trading, we offer a lifetime license for $5000. This license covers the setup of a dedicated webhook server on Vercel—or as a Docker container on platforms such as AWS, Heroku, DigitalOcean, or Azure—with full source code provided. By default, a webhook server on Vercel stores your sensitive credentials on Vercel's infrastructure; however, if you need even greater security, we can implement advanced encryption and customized secure storage solutions tailored to your needs.
Dedicated Webhook Server – Monthly License:
For users who prefer not to commit to a lifetime license, we offer a dedicated webhook server service at $50 per month. This plan supports up to 4000 JSON signals per month, making it ideal for reliable and secure automated trading with predictable monthly costs.
Trading Bots on Windows:
These bots allow you to store your credentials locally on your own computer for an added layer of security.
Disclosure and Disclaimer:
Please be aware that all trading involves risk. The signals provided are for informational purposes only, and no guarantee is made regarding trade performance. Users are responsible for their own trading decisions and should conduct thorough research. Our service is provided on an "as-is" basis, and we disclaim any liability for any losses incurred.
This system removes the stress of manual trading. By setting up TradingView alerts that send simple JSON messages to the bot, your trades are automatically executed at the right time, and you're kept informed via Discord notifications. Customize the JSON examples to match your trading style, and enjoy seamless, automated trading.