Skip to content
Signal Pilot

Webhooks (TradingView โ†’ Bot)

Webhooks allow TradingView alerts to be sent to external services, bots, or APIs for automation. This guide covers how webhooks can be configured and used with Signal Pilot indicators.

Educational Purpose

This guide presents webhook integration for educational and automation purposes. Automated trading carries significant risks. This is not financial advice.

๐Ÿ“ก What Are Webhooks?

Webhooks are automated HTTP POST requests sent from TradingView to a URL you specify when an alert triggers. Common uses include:

  • Notifications: Send alerts to Discord, Telegram, or Slack
  • Logging: Record alerts in a database or spreadsheet
  • Automation: Trigger actions through custom APIs
  • Testing: Monitor alert frequency and conditions

โœ… Prerequisites

Before configuring webhooks, the following items are typically needed:

  • TradingView Pro, Pro+, or Premium: Free accounts do not have webhook access
  • Webhook endpoint URL: A service that receives HTTP POST requests (e.g., Discord webhook, custom server, automation platform)
  • Signal Pilot indicator: Configured and added to your chart
  • Basic JSON knowledge: Helpful for customizing message payloads (optional)

๐Ÿ”ง Step-by-Step Setup

Step 1: Get Your Webhook URL

The webhook URL depends on where alerts are being sent:

Discord Webhook

  1. In Discord, go to Server Settings โ†’ Integrations โ†’ Webhooks
  2. Click "New Webhook"
  3. Configure name and channel
  4. Copy the webhook URL (format: https://discord.com/api/webhooks/...)

๐Ÿ“ธ Screenshot Coming Soon

Discord Webhook Creation Interface

We'll add a screenshot of Discord's webhook creation interface showing the integration panel and webhook setup steps.

Telegram Bot

  1. Search for "@BotFather" in Telegram
  2. Send /newbot and follow prompts
  3. Get bot token
  4. Use a webhook bridge service or custom server to forward TradingView webhooks to Telegram

Custom Server/API

Custom endpoints can be created using platforms like:

  • Webhook.site: For testing (receives and displays webhook payloads)
  • Make.com (Integromat): For connecting to multiple services
  • Zapier: For workflow automation
  • Custom server: Python Flask, Node.js Express, etc.

Step 2: Configure TradingView Alert

  1. On your chart with Signal Pilot indicator, click the Alert icon (clock with +)
  2. In the alert dialog:
    • Condition: Select your Signal Pilot indicator and desired alert condition
    • Options: Set "Once Per Bar Close" to avoid intrabar repaints
    • Expiration: Set according to your needs (commonly "Open-ended")
  3. Scroll down to "Notifications" tab
  4. Check the "Webhook URL" box
  5. Paste your webhook endpoint URL

๐Ÿ“ธ Screenshot Coming Soon

TradingView Alert Dialog - Webhook URL Field

We'll add a screenshot of TradingView's alert configuration dialog showing the Webhook URL input field in the Notifications section.

Step 3: Customize Alert Message (Optional)

In the "Message" field, you can customize what data is sent. TradingView supports placeholders:

{
  "indicator": "{{ticker}}",
  "price": "{{close}}",
  "time": "{{time}}",
  "signal": "Pentarch Reversal Detected",
  "timeframe": "{{interval}}"
}

Common TradingView Placeholders:

  • {{ticker}}: Symbol name (e.g., "BTCUSDT")
  • {{close}}: Current close price
  • {{time}}: Alert trigger time
  • {{interval}}: Timeframe (e.g., "15", "1D")
  • {{exchange}}: Exchange name

Step 4: Test the Webhook

  1. After creating the alert, click "Test" button in alert settings
  2. Check your webhook destination (Discord channel, webhook.site, etc.)
  3. Verify the message appears with correct formatting
  4. If nothing appears, check:
    • Webhook URL is correct
    • TradingView account has webhook access (Pro+ or Premium)
    • Endpoint is accessible (not blocked by firewall)

๐Ÿ“ธ Screenshot Coming Soon

Discord Webhook Test Message Success

We'll add a screenshot of Discord chat displaying a successful test message from the webhook with properly formatted Signal Pilot alert data.

๐Ÿ’ฌ Message Format Examples

Discord-Formatted Message

{
  "content": "๐Ÿ”” **Signal Pilot Alert**",
  "embeds": [{
    "title": "Pentarch Reversal",
    "description": "Reversal pattern detected on {{ticker}}",
    "color": 65280,
    "fields": [
      {"name": "Price", "value": "{{close}}", "inline": true},
      {"name": "Timeframe", "value": "{{interval}}", "inline": true},
      {"name": "Time", "value": "{{time}}", "inline": false}
    ]
  }]
}

Simple Text Message

Signal Pilot: {{ticker}} - Harmonic Oscillator cross detected at {{close}} on {{interval}} timeframe

Structured JSON for Custom API

{
  "alert_type": "signal_pilot",
  "indicator": "janus_atlas",
  "symbol": "{{ticker}}",
  "exchange": "{{exchange}}",
  "timeframe": "{{interval}}",
  "price": "{{close}}",
  "timestamp": "{{time}}",
  "condition": "Level Break Alert"
}

๐ŸŒ Common Webhook Platforms

Platform Use Case Setup Complexity
Discord Team notifications, logging Very Easy
Telegram Mobile notifications Moderate (requires bot + bridge)
Make.com Multi-service integration Easy (visual workflow)
Zapier Connect to 5000+ apps Easy (visual workflow)
Webhook.site Testing and debugging Very Easy
Custom Server Full control, custom logic Advanced (programming required)

๐Ÿ” Troubleshooting

๐Ÿ” Webhook Troubleshooting Flowchart

Follow this diagnostic flow if webhooks aren't working:

Quick Test: Always test your webhook with webhook.site first. If it works there but not in Discord/Telegram, the issue is with your Discord/Telegram webhook setup.

Webhook Not Received

  • Verify TradingView plan: Free accounts cannot use webhooks
  • Check URL: Ensure no extra spaces, correct protocol (https://)
  • Test endpoint: Use webhook.site to verify TradingView can reach your URL
  • Alert fired?: Check TradingView alert log to confirm alert actually triggered

Wrong Data in Message

  • Placeholder syntax: Must use {{ticker}} not {ticker}
  • JSON formatting: Validate JSON at jsonlint.com if using structured format
  • Quote escaping: Use \" for quotes inside JSON strings if needed

Too Many Webhooks (Spam)

  • Alert frequency: Change from "Once Per Bar" to "Once Per Bar Close"
  • Condition specificity: Use more specific alert conditions
  • Cooldown period: Some webhook services have rate limits

๐Ÿ”’ Security Considerations

Important Security Notes

  • Webhook URLs are sensitive: Treat them like passwords and avoid sharing publicly
  • Rotate URLs periodically: Especially for critical automation
  • Validate incoming data: If using custom server, verify requests come from TradingView
  • HTTPS strongly preferred: Unsecured HTTP endpoints pose security risks

๐Ÿ“‹ Example Workflow

Scenario: Receiving Pentarch reversal alerts in a Discord channel

  1. Created Discord webhook in #trading-alerts channel
  2. Configured Pentarch v1.0 on BTCUSDT 15m chart
  3. Set alert on "Pentarch: Reversal Detected" condition
  4. Set to fire "Once Per Bar Close"
  5. Pasted Discord webhook URL in alert settings
  6. Customized message with Discord embed format (shown above)
  7. Tested alert - message appeared in Discord
  8. Alert now active - team receives notifications when reversal patterns are detected

(Historical workflow example for educational purposes only. Not financial advice. Individual results may vary.)


What You've Learned
  • Webhook Fundamentals: Webhooks send HTTP POST requests with custom JSON data from TradingView alerts to external services (Discord, Slack, custom automation systems, trading bots) for real-time notifications
  • Setup Process: Create webhook URL in external service, configure TradingView alert with webhook URL, customize message format using JSON with placeholders like {{ticker}}, {{close}}, {{time}}, then test before going live
  • Message Customization: Use JSON format to structure alert data - include ticker symbol, price levels, timeframe, signal type, timestamp, and any other relevant trading context for your workflow
  • Popular Integration Examples: Send alerts to Discord channels (team coordination), Slack workspaces (trading desk communication), custom APIs (automated trade execution), or logging services (performance tracking)
  • Placeholder Variables: TradingView provides {{ticker}}, {{exchange}}, {{close}}, {{open}}, {{high}}, {{low}}, {{volume}}, {{time}}, {{interval}} placeholders for dynamic alert content
  • Testing Best Practices: Always test webhook with simple message first, verify JSON formatting with online validators, check webhook URL is correct, confirm messages appear in destination service before enabling for live trading
  • Workflow Optimization: Create separate alerts for different conditions (entry signals vs exit signals), use descriptive names for organization, document webhook setups, log all alerts to track performance over time

Next Steps: Review Core Alert Configuration Guide for basic TradingView alert setup, or explore your chosen integration service's documentation for advanced webhook customization options.


๐Ÿš€ Next Steps

  • Multiple alerts: Create separate alerts for different conditions
  • Alert management: Use descriptive names to organize alerts
  • Logging: Consider logging all alerts to track performance over time
  • Documentation: Document your webhook setup and message formats
  • Testing: Always test with paper trading before live trading

Related Resources