Documentation

Connecting TradingView to FirmGated.

Step-by-step setup for sending TradingView alerts to your FirmGated strategy webhook — including Pine Script strategies and indicator-based alerts.

How it works

TradingView fires an HTTP POST to your FirmGated webhook URL every time your alert condition is met. FirmGated reads the JSON in the message body, checks it against your safeguards and account rules, then routes the trade to your broker. You do not need to keep TradingView or your browser open — the alert fires from TradingView’s servers directly to FirmGated.

01
Create your strategy in FirmGated

Go to Strategies → New Strategy. Give it a name, choose the asset class, and save it. Your webhook URL is generated automatically — copy it from the Webhook section on the strategy page.

02
Connect your broker account

Go to Brokers → Connect and add your paper or live account. Once connected, go to Subscriptions → New Subscription and link your strategy to that broker account.

03
Open TradingView and create an alert

On your chart in TradingView, click the alarm clock icon or right-click and choose Add Alert. In the alert settings, select the condition that should trigger your entry or exit.

04
Paste the webhook URL

In TradingView's alert dialog, click Notifications and enable Webhook URL. Paste your FirmGated strategy webhook URL into the field.

05
Paste the JSON payload into the Message field

In the Message field, paste your JSON signal. For a basic market buy: { "ticker": "NQ", "action": "buy", "quantity": 1 }. For Pine Script strategies, use TradingView dynamic variables like {{strategy.order.action}} so each alert fills in the correct values automatically.

06
Send a test alert and verify on FirmGated

Trigger the alert manually from TradingView (or wait for your condition to fire). Then go to FirmGated → Signals and confirm the signal arrived. Check the status — if it shows pending_confirmation, approve it on the Notifications page first.

Pine Script strategy template

When your alert is attached to a strategy() script, TradingView can fill in the values dynamically using built-in variables. Use this template in the Message field:

// Paste this into TradingView alert Message field
// for use with a Pine Script strategy()

{
  "ticker": "{{ticker}}",
  "action": "{{strategy.order.action}}",
  "quantity": {{strategy.order.contracts}},
  "price": {{strategy.order.price}}
}

Indicator-based alerts

If your script uses indicator() instead of strategy(), TradingView does not provide dynamic order variables. Create two separate alerts — one for entries and one for exits — each with its own hardcoded JSON:

// For indicator()-based alerts, create two separate alerts:
// One for BUY entries, one for SELL entries.

// BUY alert Message:
{
  "ticker": "NQ",
  "action": "buy",
  "quantity": 1
}

// SELL alert Message:
{
  "ticker": "NQ",
  "action": "sell",
  "quantity": 1
}

Important notes

TradingView plan requirement
Webhook alerts require a TradingView paid plan (Essential or higher). Free accounts cannot send webhooks.
Repainting indicators
Some indicators repaint — meaning their signal on a historical bar can change as new data comes in. If your strategy triggers on a repainting condition, you may receive alerts that do not reflect what the chart shows after the fact. Test thoroughly on paper before going live.
One alert, one signal
Each time your TradingView alert fires, FirmGated receives one signal. If your alert condition fires multiple times in quick succession, FirmGated's duplicate protection will attempt to catch repeats, but design your alerts to fire cleanly once per intended trade.
Always test on paper first
Before routing any TradingView alert into a live or funded account, verify the full flow on a paper account. Confirm the signal appears on FirmGated's Signals page and shows the correct ticker, action, and quantity.