Alerts and automation

One alert per strategy sends every order to your bridge or your phone. This page walks you through it.

How automation works

  • 1 · Your TradingView alert

    Sends the strategy’s order message the moment an order fills.

  • 2 · Your bridge

    PineConnector, TradersPost, a signal bot or your own tool reads it.

  • 3 · Your broker

    Places the trade in your account.

Where do you trade?

PineConnector (MetaTrader 4 or 5)

  1. Install PineConnector’s EA in MetaTrader. Attach it to a chart and turn Algo Trading on.
    • You should see: The EA’s smiley in the chart corner.
    • If not: MetaTrader must keep running; a VPS keeps it on when your computer sleeps.
  2. In the EA settings, turn on Close on Reverse and keep Magic Restriction on.
  3. In PineConnector, leave Signal Authentication off.
    • If not: With it on, PineConnector blocks every signal: our alerts send no authentication key.
  4. Inputs → Send alerts to → PineConnector (MT4/MT5). Paste your PineConnector license ID.
    • If not: The panel says PineConnector license ID is empty · enter it so the alerts are accepted until you do.
  5. Units per lot (GoldDigger: Ounces per lot): your MetaTrader symbol’s contract size. Lots sent = quantity ÷ this, in 0.01 steps. Lot sizes
  6. Broker symbol: exactly as in MetaTrader’s Market Watch, for example XAUUSD.m or NAS100.
  7. Create the one alert with the webhook URL https://webhook.pineconnector.com.
  8. Test without a trade: a separate one-time price alert on a market that is open now, for example BTCUSD (condition Greater Than 0, trigger Only once, same URL), with the message LicenseID,test,test, using your ID.
    • You should see: The test in PineConnector’s portal and MetaTrader’s Experts tab. No trade. Delete the test alert afterwards.
PineConnector chosen, with license ID, Units per lot and Broker symbol

TradersPost

For US brokers such as Alpaca, Tradovate, NinjaTrader, TradeStation, Coinbase and Kraken.

  1. In TradersPost, connect your broker (a paper account first), create a strategy and copy its webhook URL.
  2. Inputs → Send alerts to → TradersPost. Fill Broker symbol only if your broker names the market differently.
  3. Create the one alert with the TradersPost URL.
  4. In TradersPost, check the strategy is active and subscribed to your account.
    • You should see: With “Auto Submit” off, signals wait for your approval.
  5. Test without an order: TradersPost’s Send Test button.
  • The quantity is sent in units of the chart symbol. TradersPost’s own multipliers can change it.
  • Adaptive Grid adds layers: allow adding to an open position, or TradersPost answers “Position Already Open”.
  • Futures need contracts. CFDs and futures

Custom and signal bots

  1. Inputs → Send alerts to → Custom.
    • You should see: The two message fields are active. Your saved texts from before are still there.
  2. Paste your bot’s entry code into Entry/Buy alert message and its exit code into Exit/Close alert message.
  3. Use placeholders where your bot needs them: TradingView’s ({{strategy.order.action}}, {{strategy.order.contracts}}, {{ticker}}) and ours: {side} (long/short), {SIDE} (LONG/SHORT), {qty} (the new position size; 0 on exits).
  4. Create the one alert with your bot’s webhook URL.
Inputs tab: Alert Messages with Send alerts to

Webhook (JSON)

  1. In your service, create the connection that receives TradingView webhooks and copy its webhook URL.
  2. Inputs → Send alerts to → Webhook (JSON). No extra fields.
  3. Turn on Show alert message preview to see the next message in the panel.
    • You should see: A JSON message under “Next long entry”.
  4. Create the one alert with that URL.
  5. In your service, map the fields: event (entry/exit), action (buy/sell), ticker, contracts (order quantity), new_position, position_after, price, time.
The alert message preview in the status panel

By hand (Plain text)

  1. Inputs → Send alerts to → Plain text.
  2. In the alert, tick Notify in app (and email if you like) instead of a webhook.
  3. On your phone, sign in to the TradingView app with the same account and allow notifications.
    • You should see: Messages like “… BUY: go LONG … at …”.
Entry, long
What you do: Buy the quantity in the message.
Entry, short
What you do: Sell short the quantity in the message.
“closes the opposite position first”
What you do: Close the old side, then open the new one. The quantity is the new position.
Exit
What you do: Close the whole position.

What TradingView needs

Strategies on the chart, Strategy Tester
Basic (free): yes
Essential: yes
Plus: yes
Premium: yes
Strategy alerts and webhooks
Basic (free): no
Essential: yes
Plus: yes
Premium: yes
Alerts expire
Basic (free): –
Essential: after 2 months
Plus: after 2 months
Premium: can run without end
Full history (Deep Backtesting)
Basic (free): no
Essential: no
Plus: no
Premium: yes
  • Webhooks need two-factor login on your TradingView account: profile picture → Settings → Account settings → Two-factor authentication.
  • The TradingView plan is a separate subscription with TradingView, not part of your pass. TradingView’s plans and limits can change.

Create the one alert

Before: a paid plan, two-factor login on, your service’s webhook URL ready.

  1. Inputs: set Start date to today. Set Send alerts to to your service and fill its fields.
    • You should see: Fields your service doesn’t use turn grey.
  2. Properties: set Initial capital to your account size. Click OK.
  3. Look at the status panel.
    • You should see: ● Ready or ● Custom setup, and Next order with the quantity you expect.
    • If not: ● Check: read the rose line and fix it first. Notices
  4. Open the alert window: the alarm-clock icon in the top toolbar, then Create manually (or Alt + A).
  5. Condition: pick the strategy (its name). Not the price, not “Crossing”. Leave Interval as it is (Same as chart).
  6. Message: TradingView fills in its own text. Delete all of it and paste {{strategy.order.alert_message}}, nothing before or after it.
    • You should see: The Message field holds only that one line.
    • If not: With TradingView’s own text, your bridge gets no order.
  7. Notifications tab: tick Webhook URL and paste your service’s address. By hand: tick Notify in app instead.
  8. Expiration: pick the latest date offered. Click Create.
    • You should see: The alert in the Alerts list (right sidebar), status Active.
    • If not: Alert didn’t fire
Create alert: condition and message
Example: Adaptive Grid (SureShot) on NDX. Your Message field holds only {{strategy.order.alert_message}}, nothing before or after it.
Notifications tab with the Webhook URL

Start date for live trading

  • What it does: the strategy places no orders before this date.
  • Backtest: leave it in the past. You see all past trades.
  • Live with an alert: set it to the day you create the alert. The strategy starts flat, like your account, and sizes orders from your Initial capital.
  • Why: without it, the strategy may already hold a position from the backtest that your account doesn’t have. The next exit would close a trade you never opened.

A future date shows the line Start date … · no orders until then (normal when preparing live trading). That is normal.

Changed something? Create the alert again

  1. Open TradingView’s Alerts list and delete the strategy’s alert.
  2. Make your change (size, start date, Send alerts to, Initial capital), or reload after an update.
  3. Create the alert again, as above.
    • You should see: One active alert again.

Test safely

  • Start on a demo account. Compare every fill with the trade on the chart.
  • Show alert message preview shows the next message in the panel.
  • TradingView → Alerts → Log shows whether TradingView fired and delivered the webhook.
  • Never test with a real order or a real close command.
  • Never test a crypto bot with made-up messages.

Expiry and limits

  • Essential and Plus alerts expire after 2 months. Renew: Alerts list → edit → latest date, or create it again.
  • Each plan limits the number of alerts. One strategy needs one alert per destination.
  • TradingView stops an alert that fires more than 15 times in 3 minutes. That is rare for our strategies.
  • Notification quiet hours can mute webhooks. Check them.

Questions

Do I need one alert for long and one for short?

No. One alert per strategy carries every entry and exit.

Can I run several strategies?

Yes. Each one needs its own chart and its own alert.

Can one strategy trade two broker accounts?

One alert sends to one webhook URL. A second destination needs a second alert, or a bridge that copies to several accounts.

Does TradingView need to stay open?

No. Alerts run on TradingView’s servers. MetaTrader must keep running if you use PineConnector.

What goes into the Message field?

Only {{strategy.order.alert_message}}. Delete the text TradingView fills in first: with it, your bridge gets no order.

Still stuck?

Ask our AI assistant (the button at the bottom, 24/7), or email support@pineindicators.com with your TradingView username, the strategy and a screenshot of the panel. A person replies within 24 hours, weekends included.

This help is general. It explains how our strategies and TradingView work. It is not investment advice, and you decide every setting yourself. Test on a demo account first.