Manual Alerts vs Pine Script Alerts: Key Differences

TradingView allows you to automate alerts in two main ways:

Both types can integrate with Xerolite via webhook, but they differ in flexibility, complexity, and how alert messages are constructed.


🧩 Key Differences

FeatureManual AlertPine Script Alert
Created viaTradingView UIScript (e.g., strategy.entry)
Needs coding?❌ Noβœ… Yes
Webhook supportβœ…βœ…
Placeholdersβœ… Some (e.g. {{close}})βœ… Full support (e.g. {{strategy.order.price}})
Custom logic❌ Limitedβœ… Fully programmable
Alert reuse❌ Must create multiple alertsβœ… One strategy, multiple alerts
Best forSimple price-based alertsAdvanced automation
Manual vs Pine Script Alerts

πŸ’¬ Alert Message Format Comparison

When integrating with Xerolite, alerts must send a valid JSON message to the webhook URL. Below is how the JSON is written in each method:

πŸ“¦ Manual Alert Example (Hardcoded)

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

Manual alerts require you to hardcode every field. If you want to change quantity, symbol, or order type, you need to edit each alert individually.

βš™οΈ Pine Script Alert Example (Using Placeholders)

{
  "action": "{{strategy.order.action}}",
  "symbol": "AAPL",
  "qty": "{{strategy.order.contracts}}",
  "order_type": "MKT",
  "currency": "{{syminfo.currency}}",
  "asset_class": "STOCK",
  "exch": "SMART"
}

This format allows dynamic values to be filled in at runtime by TradingView, based on your Pine Script strategy. You write the alert once and reuse it across multiple conditions.

πŸ’‘ Tip: Avoid using {{ticker}} because it may not match Interactive Brokers’ symbol format. Instead, use fixed symbols and define symbol, asset_class, and exch manually, or generate alerts using the Xerolite Smart Alert Builder.


βœ… Pros & Cons Summary

πŸ–±οΈ Manual Alerts

  • βœ… Simple setup, no coding needed
  • βœ… Good for price alerts or static trades
  • ❌ Limited to fixed logic
  • ❌ No access to real-time trade values
  • ❌ Must create one alert per action (e.g. buy/sell)

πŸ’» Pine Script Alerts

  • βœ… Full control via script logic
  • βœ… Use placeholders for dynamic values
  • βœ… Fewer alerts needed (one script = multiple trades)
  • ❌ Requires coding knowledge
  • ❌ May take time to debug properly

πŸ› οΈ Generate Alerts with Smart Alert Builder

To avoid JSON formatting mistakes and ensure broker compatibility, use the Xerolite Smart Alert Builder in Xerolite. It supports both static and placeholder-based messages.

Xerolite Smart Alert Builder – helps build valid webhook messages

πŸ‘‰ View Alert Request Builder User Manual

πŸ‘‰ View supported fields & placeholders


πŸ”— Related Guides