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:

  • A paid TradingView plan (Essential, Plus 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/...)
The Discord server settings Integrations page, showing the Webhooks row with a Create Webhook button, alongside Channels Followed, Twitch and YouTube.
Webhooks live under Integrations in a Discord server’s own settings. Creating one here produces the URL that TradingView will post to.

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
The TradingView alert Notifications tab with Notify in app, Show toast notification, Send email and Webhook URL checked, the URL field showing a placeholder address, and Play sound and Send plain text unchecked.
The Webhook URL field appears once the checkbox above it is ticked. TradingView sends the alert message as the body of a POST request to whatever address you paste here.

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: IGN event",
  "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 (Essential, Plus or Premium)
    • Endpoint is accessible (not blocked by firewall)
A Discord message posted by an application named Signal Pilot Alerts, reading BULLISH FLOW on BTCUSDT.P 4h with quality and regime percentages and entry, stop, target, size and risk values.
The alert arriving in Discord. The webhook posts the message text exactly as TradingView sent it, so what you see here is what the alert template produced.

πŸ’¬ Message Format Examples

Discord-Formatted Message

{
  "content": "πŸ”” **Signal Pilot Alert**",
  "embeds": [{
    "title": "Pentarch: IGN event",
    "description": "IGN event printed 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 regime change 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 Not Sending? Check This:
  1. Is webhook URL set in alert? β†’ If no, add the URL
  2. Does the alert fire? β†’ If no, fix the alert first
  3. Tested with webhook.site? β†’ If no, test there first. If fails, regenerate URL
  4. Is the format correct? β†’ Check Discord/Telegram-specific formatting
  5. Is JSON valid? β†’ Use a JSON validator to check syntax
  6. Do you have a paid TradingView plan? β†’ Free accounts cannot use webhooks

Quick Test: Always test with webhook.site first. If it works there but not Discord/Telegram, the issue is your destination 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 IGN 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 the "Pentarch: IGN event" 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 - the channel receives a message each time an IGN event prints

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