Learn how to set up powerful trading commands that automatically execute trades on Interactive Brokers when your TradingView alerts trigger.
Setting Up TradingView Alert Commands with Traderelay
Base requirements: Install and Configure Traderelay software and IB tradestation to run on your computer
Make sure both applications are properly installed and connected before proceeding with alert setup.
Step 1: Create TradingView Alert
- Open your chart on TradingView.com
- Click the "Alert" button (alarm clock icon)
- Set your alert conditions (your strategys trigger)
- In the "Message" field, enter your trading command
- Configure webhook URL to point to your Traderelay instance (like srv3.traderelay.net)
Step 2: Available Trading Commands
Command |
Action |
Description |
LONG |
Market Buy |
Opens a long position (buys the instrument) |
SHORT |
Market Sell |
Opens a short position (sells the instrument) |
CLOSE |
Close Position |
Automatically closes any existing position (long or short) |
Step 3: Test Your Setup
- Start with paper trading mode in Traderelay
- Create a simple test alert in TradingView with "LONG" command
- Wait to trigger the alert and verify Traderelay receives it
- Check that the fake order is logged correctly
- Once satisfied, just enable live trading mode
Command Usage Examples
- Breakout Strategy: Use "LONG" when price breaks above resistance → Use "CLOSE" at profit target
- Reversal Trading: Use "SHORT" at overbought levels → Use "CLOSE" when oversold
- Stop Loss Management: Use "CLOSE" command for automatic position closure at stop levels
- Momentum Trading: Combine "LONG" and "SHORT" commands based on indicator signals
Best Practices
- Traderelay automatically logs all orders with timestamps and plays sound notifications
- The CLOSE command intelligently detects your position direction and closes appropriately
- Commands are case-insensitive (LONG, long, Long all work the same)
- Always test thoroughly in paper trading mode before going live
- Keep Traderelay running during trading hours for reliable execution
- Monitor your positions and have manual override capabilities ready
Frequently Asked Questions
What happens if Traderelay is not running when an alert triggers?
The alert will be missed. Always ensure Traderelay is running during your trading hours for reliable execution.
Can I use custom position sizes for different commands?
Position sizes are configured within the Traderelay application settings and apply to all incoming commands.
Does the CLOSE command work with partial positions?
Yes, the CLOSE command automatically detects your exact position size and closes the entire position, regardless of size.