Skip to main content

Alert Message Validator & Sender

The Alert Message Validator & Sender is a powerful testing tool in XeroLite that allows you to validate alert message formats and send test orders directly to your Interactive Brokers account without going through TradingView.

Overview

This tool helps you:

  • Validate JSON Format: Check if your alert message is correctly formatted
  • Test Order Placement: Send test orders directly to XeroLite to verify they work
  • Debug Issues: Identify problems with alert messages before using them in TradingView
  • Learn by Example: Use pre-built sample requests to understand different order types

When to Use

Use the Alert Message Validator & Sender when you want to:

  • Test alert messages before setting them up in TradingView
  • Verify that your JSON format is correct
  • Test order placement without waiting for TradingView alerts
  • Debug why orders aren't being placed correctly
  • Learn how different order types work

Accessing the Tool

  1. Log in to XeroLite
  2. Navigate to the "Alert Message Validator & Sender" tab
  3. The tool will display a JSON message input field and action buttons

Using the Tool

Step 1: Prepare Your Alert Message

You can get your alert message from:

  • Alert Request Builder: Build a message using the Alert Request Builder and it will automatically populate here
  • Manual Entry: Type or paste your JSON message directly
  • Sample Templates: Click on quick suggestion buttons to load sample requests

Step 2: Validate the Message

  1. Click "Validate" button
  2. The tool will check:
    • JSON syntax is valid
    • Required fields are present
    • Field values are in correct format
    • Order parameters are valid
  3. Review Results:
    • Success: Message is valid and ready to use
    • Error: Review error message and fix issues

Step 3: Send Test Order (Optional)

  1. After validation succeeds, click "Submit Order" button
  2. The order will be sent directly to XeroLite
  3. Check Results:
    • Success: Order was placed successfully - click the success message to view in Incoming Alerts
    • Error: Review error message to understand what went wrong

Sample Request Templates

The tool includes pre-built sample requests for common scenarios:

  • Buy 10 AAPL Market Order - Simple market order
  • Buy 10 ES Future LIMIT Order - Limit order for futures
  • Sell 1000 GBPJPY MARKET Order with TP/SL - Market order with stop-loss and take-profit
  • Buy 100 TSLA TRAIL Order with 5% - Trailing stop order with percentage
  • Sell 50 NQ Future TRAIL Order with $50 - Trailing stop order with fixed amount
  • Buy 5000 EURUSD LIMIT with TP/SL - Limit order with stop-loss and take-profit
  • Buy 200 MSFT TRAIL Order with 2% - Another trailing stop example

Click any sample to load it into the message field.

Understanding Validation Results

Success Message

Message is validated successfully!

This means your JSON is correctly formatted and all required fields are present.

Error Messages

Common validation errors:

  • "Invalid message format" - JSON syntax error (missing commas, brackets, etc.)
  • "Missing required field: [field name]" - Required field is missing
  • "Invalid field value" - Field value doesn't match expected format
  • "Invalid order type" - Order type is not supported
  • "Price required for LIMIT orders" - LIMIT orders must include price

Understanding Order Placement Results

Success

Order placed successfully! Click here to view details.
  • Click the message to navigate to Incoming Alerts tab
  • Your test order will appear in the Incoming Alerts list
  • The order will be sent to Interactive Brokers

Error

Error placing order. Please try again.
  • Check that XeroLite is connected to TWS
  • Verify your account has sufficient buying power
  • Review the error details in Incoming Alerts tab

Best Practices

  1. Always Validate First: Use the Validate button before submitting orders
  2. Test with Paper Trading: Use paper trading account for testing
  3. Start Simple: Test basic orders before trying complex combinations
  4. Check Incoming Alerts: After submitting, check Incoming Alerts tab for details
  5. Use Sample Templates: Learn from the pre-built examples

Integration with Alert Request Builder

The Alert Message Validator & Sender works seamlessly with the Alert Request Builder:

  1. Build your alert in the Alert Request Builder tab
  2. Click "Copy JSON" or use the "Test Place Order" feature
  3. The message will automatically appear in the Alert Message Validator & Sender tab
  4. Validate and test the order

Need Help?

If you encounter issues with validation or order placement: