11. Connect & Test TradingView Alerts
After creating your TradingView alert, you need to verify that alerts are being received and processed by XeroLite correctly. This section guides you through testing the connection.
Prerequisites
- TradingView alert created and active (see Create TradingView Alert)
- XeroLite connected to Interactive Brokers (see Connect Xerolite to IB TWS)
- Paper trading account recommended for testing
11.1: Open XeroLite Incoming Alerts
- Log in to XeroLite:
- Open your web browser
- Navigate to your XeroLite Cloud Edition URL
- Log in with your XeroLite credentials
- Navigate to Incoming Alerts:
- Look for Incoming Alerts tab or section in the XeroLite interface
- This section shows all alerts received from TradingView
- Click on the Incoming Alerts tab or menu item
- Verify Incoming Alerts is Ready:
- The Incoming Alerts section should be ready to receive alerts
- Check that the interface is displaying correctly
- Ensure there are no error messages
Incoming Alerts Features
The Incoming Alerts section shows:
- Alert List: All received alerts in chronological order
- Alert Status: Success, Error, Pending, Routed, etc.
- Alert Details: Full alert message, timestamp, processing status
- Filter Options: Filter by status, date, symbol, etc.
11.2: Trigger Test Alert
Method 1: Manual Test from TradingView
- Create Test Alert:
- In TradingView, create a simple test alert with immediate trigger
- Use a price level that will trigger immediately (e.g., current price)
- Set a small quantity (e.g., 1 share) for safety
- Trigger Alert Manually:
- If using price alert, set trigger price to current market price
- The alert should fire immediately
- Or wait for your strategy condition to be met
- Monitor in TradingView:
- Check TradingView alerts list
- Verify the alert shows as "Triggered"
- Note the trigger timestamp
Method 2: Use Alert Request Builder Test
- Open Alert Request Builder:
- In XeroLite, navigate to Alert Request Builder
- Build a test alert message
- Use Test Place Order feature if available
- Send Test Alert:
- Click the test button to send a test alert
- This simulates an alert from TradingView
- Monitor the alert in the Incoming Alerts section
Method 3: Wait for Strategy Signal
- Let Strategy Trigger:
- If using a strategy-based alert, wait for the strategy to generate a signal
- The alert will trigger automatically when conditions are met
- Monitor both TradingView and XeroLite
Test Alert Best Practices
- ✅ Use Paper Trading: Always test with paper trading account first
- ✅ Small Quantities: Use minimal quantities (1 share) for testing
- ✅ Simple Conditions: Start with simple, easy-to-trigger conditions
- ✅ Monitor Closely: Watch both TradingView and XeroLite during testing
11.3: Confirm Alert Received
Check Incoming Alerts
- View Alert in Incoming Alerts:
- In XeroLite's Incoming Alerts tab, look for your test alert
- The alert should appear shortly after triggering in TradingView
- Check the timestamp matches the TradingView trigger time
- Verify Alert Details:
- Click on the alert to see full details
- Verify all fields were parsed correctly:
- Symbol matches
- Action (BUY/SELL) is correct
- Quantity is as expected
- Order type is correct
- Check Alert Status:
- Success/Routed: Alert processed successfully
- Error: Alert had validation or processing errors
- Pending: Alert is being processed
Verify Order Execution
- Check Transaction Log:
- Navigate to Transactions tab in XeroLite
- Look for the order created from your test alert
- Verify order details match your alert
- Confirm in TWS:
- Open TWS (Trader Workstation)
- Check the Orders tab
- Verify the order appears in TWS
- Check order status (Filled, Pending, etc.)
- Verify Execution:
- For MARKET orders: Should execute immediately
- For LIMIT orders: Will execute when price reaches limit
- Check fill price and execution time
Alert Processing Status
Monitor these status indicators:
- ✅ Alert Received: Alert appears in Incoming Alerts section
- ✅ Alert Parsed: Alert message was parsed successfully
- ✅ Order Created: Order was sent to Interactive Brokers
- ✅ Order Executed: Order was filled in IB (for market orders)
Common Issues
Alert Not Appearing in XeroLite
- Check Webhook URL: Verify webhook URL in TradingView matches XeroLite
- Check IP Whitelist: Ensure TradingView IPs are whitelisted (see IP Whitelisting)
- Check XeroLite Status: Ensure XeroLite is running and accessible
Alert Appears But Order Not Created
- Check Alert Format: Verify JSON message is valid and complete
- Check Required Fields: Ensure all mandatory fields are present
- Check API Connection: Verify XeroLite is connected to IB
- Check API Precautions: Ensure TWS API precautions are configured
Order Created But Not Executing
- Check Market Hours: Some orders only execute during market hours
- Check Order Type: LIMIT orders wait for price, MARKET orders execute immediately
- Check Account: Verify you're using paper trading for testing
- Check TWS: Ensure TWS is running and connected
Testing Checklist
Before going live, verify:
- ✅ Alert triggers in TradingView
- ✅ Alert appears in XeroLite Incoming Alerts section
- ✅ Alert message is parsed correctly
- ✅ Order is created in XeroLite
- ✅ Order appears in TWS
- ✅ Order executes (for market orders) or is pending (for limit orders)
- ✅ Transaction is recorded in XeroLite
Next Steps
After confirming alerts are working correctly:
- Review How XeroLite Processes TradingView Alerts for detailed processing information
- Set up production alerts with your trading strategy
- Monitor alerts and transactions regularly
- Adjust alert conditions and messages as needed
Need Help?
If you encounter issues connecting TradingView alerts to XeroLite, contact support at [email protected]