SignalBee
Docs/Signals & Webhooks

TradingView Setup Guide

Connect TradingView alerts to SignalBee and automate your trading signals. This guide walks you through the complete setup process.


Prerequisites

Before you begin, ensure you have the following ready:

RequirementDetails
TradingView AccountPro plan or higher (webhooks require a paid plan)
SignalBee AccountVerified email address
Connected ExchangeAt least one exchange connected in SignalBee
Active WebhookWebhook created with URL and Secret copied

Tip: Keep your SignalBee dashboard open in another tab. You'll need to copy your webhook URL and secret during setup.


TradingView Plans and Limitations

Webhooks require a paid TradingView plan. The free/basic plan does not support webhook notifications.

PlanActive AlertsWebhook SupportBest For
Free/Basic1❌ NoPaper trading only
Pro20✅ YesSingle strategy traders
Pro+100✅ YesMulti-strategy traders
Premium400✅ YesProfessional traders

⚠️ Important: If you're on the Free or Basic plan, you must upgrade to Pro or higher before your alerts can send webhooks to SignalBee.

How to Check Your Plan

  1. Log in to TradingView
  2. Click your profile icon (top right)
  3. Look for your plan name below your username
  4. Upgrade at TradingView.com/gopro if needed

Creating Your First Alert (Step-by-Step)

Follow these steps to create a TradingView alert that sends signals to SignalBee.

Step 1: Open Your Chart

Navigate to TradingView.com and open a chart for the trading pair you want to automate.

  • Select the same pair format your exchange uses (e.g., BTCUSDT for Binance)
  • Ensure you're viewing the correct exchange data source in TradingView

Step 2: Add Your Indicator or Strategy

Add the indicator or strategy that will generate your trading signals.

  • Click Indicators (top toolbar) or press /
  • Search for and add your indicator
  • Configure indicator settings as needed

Step 3: Open the Alert Dialog

Open the alert creation window using any of these methods:

  • Click the alarm clock icon in the top toolbar
  • Right-click on the chart → Add Alert
  • Press Alt+A (Windows) or Option+A (Mac)

Step 4: Configure the Alert Condition

Set up when your alert should trigger:

  1. Condition: Select your indicator from the dropdown
  2. Trigger: Choose when to fire (e.g., "Crossing Up")
  3. Value: Set the threshold if applicable

Step 5: Enable the Webhook

Check the Webhook URL checkbox to reveal the URL field.

Paste your SignalBee webhook URL:

https://api.signalbee.trade/webhook/{your-webhook-id}

Tip: Copy your webhook URL directly from SignalBee DashboardWebhooks → Click the copy icon.

Step 6: Enter the JSON Payload

In the Message field, enter your JSON payload. This is the data SignalBee receives.

Basic Buy Signal:

{
  "webhook_secret": "your-webhook-secret",
  "side": "buy",
  "symbol": "{{ticker}}",
  "quantity_type": "percentage",
  "quantity": "10",
  "source_timestamp": "{{timenow}}"
}

Basic Sell Signal:

{
  "webhook_secret": "your-webhook-secret",
  "side": "sell",
  "symbol": "{{ticker}}",
  "quantity_type": "percentage",
  "quantity": "100",
  "source_timestamp": "{{timenow}}"
}

⚠️ Critical: Replace your-webhook-secret with your actual webhook secret from SignalBee. This authenticates your signals. The source_timestamp field is required for duplicate detection.

See Webhook Templates for more payload examples.

Step 7: Configure Alert Settings

Complete the remaining settings:

SettingRecommended Value
Alert nameDescriptive name (e.g., "BTCUSDT EMA Buy")
Expiration"Open-ended" for production alerts
Alert actions✅ Webhook (disable others unless wanted)

Step 8: Create the Alert

Click the Create button. Your alert now appears in the Alerts panel (right sidebar).

Step 9: Test the Alert

Verify your setup works:

  1. In SignalBee, go to SignalsHistory
  2. Wait for your alert condition to trigger (or test manually if your indicator allows)
  3. Check that the signal appears in SignalBee with status "Received"
  4. Verify the trade executed on your exchange

Tip: For testing, you can create an alert on a condition that triggers frequently (like price movement), then delete it after verification.


Alert Conditions Explained

Understanding condition types helps you create alerts that fire exactly when intended.

Crossing

Triggers once when the value crosses a threshold.

VariantWhen It Fires
CrossingValue crosses threshold in either direction
Crossing UpValue crosses from below to above
Crossing DownValue crosses from above to below

Best for: Moving average crossovers, indicator threshold breaks, support/resistance levels

Example: EMA 9 crossing up through EMA 21 = buy signal

Greater Than / Less Than

Triggers when condition is true. Can fire multiple times if condition remains true across bars.

ConditionBehavior
Greater ThanFires while value > threshold
Less ThanFires while value < threshold

⚠️ Warning: Avoid these for trading signals as they may trigger repeatedly. Use "Crossing" instead.

When to use: Monitoring conditions, not direct trade triggers

Entering/Exiting Channel

Triggers when price enters or exits a defined range.

VariantWhen It Fires
Entering ChannelPrice moves inside the range
Exiting ChannelPrice moves outside the range

Best for: Bollinger Band strategies, range-bound trading

Moving Up / Moving Down

Triggers on percentage change over a time period.

SettingDescription
Moving Up %Price increased by X% in the last Y bars
Moving Down %Price decreased by X% in the last Y bars

Best for: Momentum detection, breakout confirmation


Using Strategy Alerts

If you're using a Pine Script strategy (with backtesting), you can alert on strategy order fills.

Strategy vs Indicator Difference

TypeHas BacktestingBuilt-in SignalsAlert Setup
Indicator❌ No❌ Manual conditionsConfigure condition yourself
Strategy✅ Yes✅ Buy/sell signalsAlert on "Order fills"

Setting Up Strategy Alerts

  1. Add your strategy to the chart
  2. Right-click the strategy name → Add Alert on [Strategy Name]
  3. Set condition to "Order fills"
  4. Enable webhook and configure as usual

Strategy Placeholder Variables

TradingView provides dynamic variables you can use in your JSON message:

VariableOutputExample
{{strategy.order.action}}Order direction"buy" or "sell"
{{strategy.order.price}}Entry price"45250.50"
{{strategy.position_size}}Position size"0.5"
{{strategy.order.id}}Unique order ID"Long Entry"
{{ticker}}Trading pair"BTCUSDT"
{{exchange}}Exchange name"BINANCE"
{{time}}Alert timestamp"2024-01-15T10:30:00Z"

Strategy Alert JSON Template

{
  "webhook_secret": "your-webhook-secret",
  "side": "{{strategy.order.action}}",
  "symbol": "{{ticker}}",
  "quantity_type": "fixed",
  "quantity": "0.001",
  "source_timestamp": "{{timenow}}"
}

Tip: The {{strategy.order.action}} variable automatically outputs "buy" or "sell" based on your strategy's order direction.


Multiple Alerts for One Strategy

Complex strategies often require separate alerts for entry, take-profit, and stop-loss.

Entry Alert

Triggers when your strategy conditions indicate a buy opportunity.

{
  "webhook_secret": "your-secret",
  "side": "buy",
  "symbol": "BTCUSDT",
  "quantity_type": "percentage",
  "quantity": "10",
  "source_timestamp": "{{timenow}}"
}

Take-Profit Exit Alert

Triggers when price reaches your profit target.

{
  "webhook_secret": "your-secret",
  "side": "sell",
  "symbol": "BTCUSDT",
  "quantity_type": "percentage",
  "quantity": "100",
  "source_timestamp": "{{timenow}}"
}

Stop-Loss Alert

Triggers when price drops below your risk threshold.

{
  "webhook_secret": "your-secret",
  "side": "close",
  "symbol": "BTCUSDT",
  "quantity_type": "percentage",
  "quantity": "100",
  "source_timestamp": "{{timenow}}"
}

Coordinating Multiple Alerts

AlertConditionQuantity
EntryYour buy signal% of available balance
Take-ProfitPrice target reached100% of position
Stop-LossPrice below threshold100% of position

Tip: Use quantity_type: "percentage" with quantity: "100" for exits to sell your entire position regardless of entry size.


Alert Management Best Practices

Keep your alerts organized and reliable with these practices.

Naming Conventions

Use a consistent format: [Pair] [Strategy] [Action]

✅ Good Names❌ Poor Names
BTCUSDT EMA BuyAlert 1
ETHUSDT RSI OversoldBuy signal
SOLUSDT BB Exittest

Expiration Settings

SettingUse Case
Open-ended✅ Production alerts (never expires)
Specific dateTesting, time-limited strategies
Once per barPrevent multiple triggers per candle
Once per bar closeMost reliable for trading signals

Tip: Always use "Open-ended" for production alerts. Expired alerts are the #1 reason for missed signals.

Alert Limits by Plan

Monitor your usage against your plan's limits:

  1. Open the Alerts panel (right sidebar)
  2. Check the counter at the top (e.g., "15/20 alerts")
  3. Delete unused alerts to make room for new ones

Backup Notifications

Enable email notifications as a backup in case webhook delivery fails:

  1. In alert settings, check "Send email"
  2. You'll be notified if your alert fires
  3. Use this to verify alerts are triggering as expected

Common Issues and Solutions

Most TradingView webhook issues fall into a few categories.

ProblemCauseSolution
Alert not firingCondition not metCheck indicator logic; verify condition triggers in backtesting
Alert not firingAlert inactiveLook for red indicator on alert; recreate if expired
Alert not firingPlan limitationVerify you have Pro+ plan with webhook support
Webhook not receivedWrong URLCopy URL directly from SignalBee dashboard
Webhook not receivedInvalid JSONValidate JSON syntax at jsonlint.com
Webhook not receivedWebhook checkbox uncheckedEdit alert and re-enable webhook option
Signal rejectedWrong secretCopy-paste webhook_secret directly (no typos)
Signal rejectedTicker not whitelistedAdd ticker to your webhook's allowed pairs in SignalBee
Signal rejectedTrading disabledEnable trading in SignalBee dashboard
Multiple triggersUsing "Greater Than" conditionSwitch to "Crossing" for single-fire behavior
Multiple triggersMissing "Once per bar" settingEdit alert → Set trigger to "Once per bar close"
Trades not executingInsufficient balanceCheck exchange balance; ensure funds in correct wallet
Trades not executingExchange disconnectedRe-test exchange connection in SignalBee

Debugging Steps

  1. Check TradingView Alert History:

    • Click the Alerts panel → Select your alert → View history
    • Verify the alert fired when expected
  2. Check SignalBee Signal History:

    • Go to SignalsHistory in SignalBee
    • Look for your signal and its status/error message
  3. Validate Your JSON:

    • Copy your message content
    • Paste into jsonlint.com
    • Fix any syntax errors (missing quotes, extra commas)

Advanced: Pine Script Integration

For developers creating custom Pine Script indicators.

The alertcondition() Function

Add alert conditions that users can select when creating alerts:

//@version=5
indicator("My Custom Indicator", overlay=true)

ema9 = ta.ema(close, 9)
ema21 = ta.ema(close, 21)

bullishCross = ta.crossover(ema9, ema21)
bearishCross = ta.crossunder(ema9, ema21)

// Define alert conditions
alertcondition(bullishCross, "EMA Buy Signal", "EMA 9 crossed above EMA 21")
alertcondition(bearishCross, "EMA Sell Signal", "EMA 9 crossed below EMA 21")

The alert() Function (Pine Script v5)

Trigger alerts directly from your script with custom messages:

//@version=5
indicator("Auto Alert Indicator", overlay=true)

ema9 = ta.ema(close, 9)
ema21 = ta.ema(close, 21)

if ta.crossover(ema9, ema21)
    alert('{"side": "buy", "symbol": "' + syminfo.ticker + '"}', alert.freq_once_per_bar)

if ta.crossunder(ema9, ema21)
    alert('{"side": "sell", "symbol": "' + syminfo.ticker + '"}', alert.freq_once_per_bar)

Note: With alert(), you still need to create an alert on the indicator, but the message is generated by your script automatically.

Dynamic Data in Alerts

Use str.tostring() to include calculated values:

//@version=5
indicator("Dynamic Alert Data", overlay=true)

rsiValue = ta.rsi(close, 14)

if ta.crossover(rsiValue, 30)
    alertMessage = '{"side": "buy", "symbol": "' + syminfo.ticker + '", "rsi": "' + str.tostring(rsiValue, "#.##") + '"}'
    alert(alertMessage, alert.freq_once_per_bar)

Troubleshooting Checklist

Use these checklists when signals aren't working.

TradingView Side

  • Alert is active (green indicator, not red/gray)
  • Webhook URL checkbox is checked
  • Webhook URL is correct (no extra spaces or characters)
  • JSON message is valid syntax (test at jsonlint.com)
  • webhook_secret is included in the message
  • source_timestamp is included (use {{timenow}})
  • Your plan supports webhooks (Pro, Pro+, or Premium)

SignalBee Side

  • Webhook exists and is enabled
  • Trading is enabled for the webhook
  • Ticker is in the allowed pairs list (or list is empty for all pairs)
  • Exchange is connected and tested successfully
  • Account has sufficient balance for the trade size

Still Not Working?

  1. Create a simple test alert with a condition that fires immediately
  2. Use a minimal JSON payload with just the required fields
  3. Check both TradingView alert history AND SignalBee signal history
  4. Contact support@signalbee.trade with:
    • Your alert JSON message (redact the webhook_secret)
    • Screenshot of your TradingView alert settings
    • The error message from SignalBee (if any)