Creating Alerts in TradingView (Without Pine Script)

📝 Overview

This guide shows how to create TradingView alerts without writing any Pine Script. These alerts use TradingView’s built-in UI and work perfectly with Xerolite, as long as you provide a properly formatted JSON message.

If you’re just getting started or don’t know coding, this is the simplest way to automate your trading with Xerolite.


⚙️ Step-by-Step: Creating Alerts Without Pine Script

Step 1: Open the TradingView Chart

Search for your symbol (e.g. AAPL) and open the chart view.

Step 2: Click on the Alert Button

Click the 🔔 icon at the top of the screen or right-click on the chart and choose “Add Alert”.

Step 2: Clicking the alert button

Step 3: Set Alert Conditions

Choose your trigger condition (e.g., AAPL crosses 150). You can use price, moving average, or any supported indicator.

Step 3: Image placeholder – set alert condition

Step 4: Set Alert Actions

  • âś… Enable Webhook URL
  • Paste your Xerolite webhook URL:
    https://your-xerolite-server.com/webhook
  • Paste the alert message in JSON format (see below)
Step 4: Image placeholder – webhook and message box

🔄 Example Alert Messages (for Xerolite)

âś… Buy Alert:

{
  "name" : "AAPL Alert",
  "action": "BUY",
  "symbol": "AAPL",
  "qty": "10",
  "currency": "USD",
  "asset_class": "STOCK",
  "exch": "SMART"
}

âś… Sell Alert:

{
  "name" : "AAPL Alert",
  "action": "SELL",
  "symbol": "AAPL",
  "qty": "10",
  "currency": "USD",
  "asset_class": "STOCK",
  "exch": "SMART"
}

đź’ˇ Important: Make sure the JSON is valid and complete. Incorrect messages may cause Xerolite to ignore the alert.


🛠️ Using the Xerolite Smart Alert Builder

To avoid formatting errors and save time, use the Xerolite Smart Alert Builder:

  1. Go to your own installed Xerolite (or go to xerolite demo site: https://stgxerolite.xeroflex.com/)
  2. Go to Alert Request Builder
  3. Fill in fields: Asset Class, Symbol & Currency
  4. Customize your order (e.g., order type, TIF, action, quantity, SL/TP, exchange)
  5. Copy the generated JSON
  6. Paste it into the TradingView alert message box
Step 4: use Smart Alert Builder
Step 5: Copy the generate JSON
Step 6 : Paste it into the TradingView alert message box

📌 Summary

  • You can create alerts via TradingView’s UI without writing code
  • Use the Webhook URL and JSON message format required by Xerolite
  • Use the Smart Alert Builder to ensure your JSON is valid
  • Xerolite will receive and execute the order based on your alert

đź”— Related Articles