Connect your strategy
Answer a few questions to find the right alert setup, or prepare your Pine Script with the guided converter.
Find the alert setup that matches your script, then follow that one guide on this page. Have the full source code? You can also convert your Pine Script.
Use a demo-only destination while setting this up. Before creating an alert, complete the account and EA checks below.
What does your script have?
Check Settings → Inputs or Create alert → Condition in TradingView.
Before creating alerts, complete the account and EA checks.
Prefer to choose directly? PineConnector-ready script · Named Buy/Sell conditions · Strategy order fills · Find my alert options
Before you create alerts
Section titled “Before you create alerts”Check these once. They apply to every guide below.
- Demo first. Connect the account in Connect MT5 and pass the demo test.
- Receiving accounts. Replace
LicenseIDwith your own complete ID. Every account sharing it receives each alert; use demo-only recipients while testing. - Broker details. Use the exact case-sensitive broker symbol, a permitted lot size and an open trading session.
- Authentication. If Signal Authentication is enabled, add your configured
secret=privately to every complete message. A saved License ID does not add it. - Receiving EA settings. Explicit units set size and targets, not which positions can be affected. Check Magic Restriction, Pyramiding for repeated entries, and Close on Reverse against your intended entries and exits.
Every alert needs the webhook. In the alert’s Notifications, tick Webhook URL and paste this address before you select Create:
https://webhook.pineconnector.comAfter creating your alerts, check the result on demo.
TradingView requires two-factor authentication for webhooks. If the option is unavailable, check your TradingView account settings and feature access.
A PineConnector-ready script
Section titled “A PineConnector-ready script”Use this route when the author supports PineConnector and the script has PineConnector fields in Inputs.
Before you start
- Use demo-only recipients and check the receiving EA settings.
- If authentication is on, use the author’s supported secret input or add your configured
secret=privately to each complete message.
1 Enter your details
Open Settings → Inputs. Enter your License ID, exact broker symbol and the message, risk or stop settings the author provides. Save the inputs.
2 Create the alert
Open Create alert for your symbol and timeframe. Follow the author’s alert method:
- If it uses
alert(), select Any alert() function call or alert() function calls only. - If a strategy supplies
alert_message, select Order fills only. Put{{strategy.order.alert_message}}in Message.

The script supplies the message. Add no second template or extra event types unless the author requires them.
In Notifications, enable Webhook URL and paste this address:
https://webhook.pineconnector.comThen select Create.
3 Check the first message
Read the first message that triggers and confirm the values it sends. Then check the result on demo, including the intended entries and exits on every recipient.
You can skip the other setup methods below.
Reverse between buy and sell
Section titled “Reverse between buy and sell”Create two alerts for the same indicator, symbol and timeframe. Use the author’s condition names for the actions below.
- Buy alert
- Close matching shorts
- Request a buy
- Sell alert
- Close matching longs
- Request a sell
Before you start
- Use demo-only recipients, with a dedicated symbol and EA scope on every account.
- Check Pyramiding so repeated entries do not add positions.
- If authentication is on, add your configured
secret=privately to both complete messages in TradingView.
1 Create the Buy alert
Open Create alert and set:
- Condition
- Your indicator → Buy or Going Long
- Trigger
- Once Per Bar Close
In the template, replace:
- LicenseID
- Your own complete License ID
- BrokerSymbol
- The exact broker symbol, including any prefix or suffix
- LotSize
- A permitted demo lot size
This is a structure template. No stop loss or take profit is included.
Enter the completed template in Message. In Notifications, enable Webhook URL and paste this address:
https://webhook.pineconnector.comSelect Create.
2 Create the Sell alert
Open Create alert again. Use the same indicator, symbol, timeframe, LicenseID, BrokerSymbol and LotSize.
Set Condition to your indicator’s Sell or Going Short condition, as confirmed by the author. Keep Once Per Bar Close.
Enter the completed template in Message. In Notifications, enable Webhook URL with https://webhook.pineconnector.com.
Select Create.
Remove superseded alerts that could duplicate these requests.
3 Verify both directions
- Observe an entry from flat, then each reversal direction.
- Check that the old opposite position closed and the expected new position opened at the requested size.
- Repeat the checks on every intended receiving account.
Next: check the result on demo. You can skip the other setup methods below.
Buy and close without shorting
Section titled “Buy and close without shorting”Create two alerts for the same indicator, symbol and timeframe. Here, Sell means exit the long, not open a short. Use the author’s condition names for these actions.
- Buy alert
- Request a buy
- Sell alert
- Close matching buys
Before you start
- Use demo-only recipients on this License ID.
closelongaffects matching buys in the EA scope on every recipient. Use a dedicated symbol and scope.- Check Pyramiding so repeated Buy signals do not add positions.
- If authentication is on, add your configured
secret=privately to both complete messages.
1 Create the Buy alert
Open Create alert and set:
- Condition
- Your indicator → Buy or Going Long
- Trigger
- Once Per Bar Close
In the template, replace:
- LicenseID
- Your own complete License ID
- BrokerSymbol
- The exact broker symbol, including any prefix or suffix
- LotSize
- A permitted demo lot size
This is a structure template. No stop loss or take profit is included.
Enter the completed template in Message. In Notifications, enable Webhook URL and paste this address:
https://webhook.pineconnector.comSelect Create.
2 Create the Sell close alert
Open Create alert again for the same indicator, symbol and timeframe.
Set Condition to your indicator’s Sell or Going Short condition, as confirmed by the author. Keep Once Per Bar Close.
Use the same LicenseID and BrokerSymbol. This message requests a close, not a new sell:
Enter the completed template in Message. In Notifications, enable Webhook URL with https://webhook.pineconnector.com.
Select Create.
Remove superseded alerts that could duplicate these requests.
3 Check the entry and exit
- Observe a Buy and then a Sell condition.
- Verify that the expected buy opens, then closes.
- Confirm that no short position opens on any intended recipient.
If Buy and Sell can occur together, or the broker result differs, pause both alerts and resolve the cause before continuing.
For short-only setups, use the exact close-position commands or the Pine Script converter when you have the source.
Next: check the result on demo. You can skip the other setup methods below.
Separate buy and sell conditions
Section titled “Separate buy and sell conditions”Use this when Buy and Sell are independent entry requests, with a separate, deliberate exit method. If Sell should close a long, follow buy and close instead.
- Buy alert
- Request a buy entry
- Sell alert
- Request a sell entry
A sell entry is not an explicit close-long command. Check receiving settings and keep a deliberate exit method.
Before you start
- Check Magic Restriction, Pyramiding and Close on Reverse on every demo recipient.
- If authentication is on, add your configured
secret=privately to both complete messages. - Maintaining older
risk=,sl=ortp=messages? Compare them with the explicit forms in the legacy input comparison before changing anything.
1 Create the Buy alert
Open Create alert for your symbol and timeframe. Set:
- Condition
- Your indicator → Buy or Going Long
- Trigger
- Once Per Bar Close
In both messages, replace the example values:
- EURUSD
- The exact broker symbol, including any prefix or suffix
- vol_lots=0.01
- A fixed 0.01 lots. Use a permitted demo size.
Use {{ticker}} in place of EURUSD only when TradingView’s ticker matches your broker’s symbol. Indicator conditions do not provide strategy order placeholders such as {{strategy.order.action}}.
Choose one Buy message and enter it in Message. The basic message includes no stop loss or take profit. Check the receiving settings for omitted targets and verify the actual broker stops on demo.
Optional pip targets: this alternative requests a 20-pip stop loss and a 40-pip take profit with the same 0.01-lot buy. Your broker’s actual entry, pip size, stop distances and volume rules apply. See PineConnector pips, sl_pips= and tp_pips= for how pips become prices.
Illustrative requests; not executed trades.
In Notifications, enable Webhook URL and paste this address:
https://webhook.pineconnector.comSelect Create.
2 Create the Sell alert
Open Create alert again for the same indicator, symbol and timeframe. Set:
- Condition
- Your indicator → Sell or Going Short
- Trigger
- Once Per Bar Close
Replace the same example values. This message requests a fixed 0.01-lot sell with no SL or TP. Illustrative request; not an executed trade.
Enter it in Message. In Notifications, enable Webhook URL with https://webhook.pineconnector.com.
Select Create.
3 Verify the intended entries and exits
Each eligible Buy or Sell condition requests an entry. Check the final alert text and the actual broker result, including any reversal or duplicate.
Verify your separate exit method.
Next: check the result on demo. You can skip the other setup methods below.
Strategy order-fill alerts
Section titled “Strategy order-fill alerts”Use this when your strategy offers Order fills only. The first stage confirms whether its fills can become entry requests.
Before you start
- If the author’s instructions use
{{strategy.order.alert_message}}, follow them instead. That placeholder reads messages the script author supplies. - Check Magic Restriction, Pyramiding and Close on Reverse on every demo recipient.
- If authentication is on, add your configured
secret=privately or use the author’s supported secret input.
1 Confirm what the fills mean
Check how the script handles exits, reversals, partial closes and quantities. Use the author’s PineConnector instructions when they provide them.
2 Prepare the order-fill message
Use this example only when every fill is intentionally a buy or sell entry request. Check these details first:
- Size
- vol_lots=0.01 requests a fixed 0.01 lots for each eligible fill, not the strategy’s simulated quantity or a percentage risk. This is an illustrative demo size, not a recommendation; replace it where needed.
- Targets
- No stop loss or take profit is specified. Check receiving settings for omitted targets and verify the actual broker stops on demo.
- Symbol
- Use the ticker only if it matches the exact symbol on every receiving broker account.
Expected request: a buy or sell of 0.01 lots on the resolved symbol for each eligible fill, with no SL or TP. Illustrative request; not an executed trade.
Using the strategy’s quantity? {{strategy.order.contracts}} is TradingView’s simulated order quantity. It is not automatically MetaTrader lots, cash risk or a percentage. Use it only after verifying the conversion for your instruments and EA Volume Type; see the volume reference.
3 Create the order-fill alert
Open Create alert for the strategy, symbol and timeframe. Set:
- Condition
- Your strategy → Order fills only
- Message
- The complete message reviewed above, matching the strategy’s intended order handling.
In Notifications, enable Webhook URL and paste this address:
https://webhook.pineconnector.comSelect Create.
4 Verify the actual broker result
Check the result on demo, including entries, exits and duplicates. Inspect the final alert text and the actual broker positions.
A strategy’s simulated fill or a processed message is not proof of a broker fill.
Useful placeholders
Section titled “Useful placeholders”{{ticker}}: the alert’s ticker. Use it in supported TradingView alert message fields.{{strategy.order.action}}: the simulated fill’s buy/sell direction. Use it in strategy order-fill alerts.
See TradingView’s alert reference for each alert method. Placeholders in the alert dialog differ from Pine Script expressions used inside alert(...).
Match the signal to the broker action
Section titled “Match the signal to the broker action”Check the author’s instructions, then choose the setup that matches both signals.
| Buy requests | Sell requests | Setup |
|---|---|---|
| Close matching shorts → Buy | Close matching longs → Sell | Entry and reversal |
| Open a long | Close matching buys only | Buy and close |
| Buy entry | Sell entry | Independent entries |
Independent entries need a separate exit method. Buy and close does not request a short.
Unclear or different behaviour? Ask the author which signals mean entries, full or partial exits, or reversals before connecting. A name or chart arrow is not enough. Once the actions are clear, use the command reference.
Find your available alert method
Section titled “Find your available alert method”Use this when you are not sure what your script offers. Three quick checks in TradingView:
| What you can select or edit | Follow this setup |
|---|---|
| Order fills only in a strategy’s alert options | Strategy order-fill alerts |
| A script’s Inputs include PineConnector messages or a License ID, and its author supports PineConnector | A PineConnector-ready script |
| Named indicator conditions such as Buy, Sell, Going Long or Going Short | Choose entry and reversal, buy and close or independent entries, according to the intended actions. |
Test 1: check the strategy’s alert menu
Section titled “Test 1: check the strategy’s alert menu”Open Create alert and select your script under Condition. If Order fills only is available, it can generate events when TradingView’s broker emulator fills the strategy’s simulated orders.

This makes alerts available. It does not establish that the strategy’s entries, exits and sizing map correctly to PineConnector; read the order-fill guide first.
Test 2: check the script’s inputs
Section titled “Test 2: check the script’s inputs”Open the script’s Settings → Inputs. Look for fields such as License ID, Symbol, Long alert message or Short alert message, and confirm with the author that they produce PineConnector-compatible messages.

A field called License ID alone is not proof of compatibility. If the author has not exposed usable messages, continue to the next test.
Test 3: check for named conditions
Section titled “Test 3: check for named conditions”Open Create alert, select the indicator, then open its condition list. Look for separate entry conditions named by its author. A generic comparison such as Crossing is not the same as a dedicated Buy or Sell condition.

If none of these options is available
Section titled “If none of these options is available”Ask the script author to add alert support or PineConnector compatibility. The author can use the Pine Script alert instructions without publishing their private strategy logic. A picture of an entry on the chart cannot, by itself, create an alert.
Check the result on demo
Section titled “Check the result on demo”Wait for a real-time condition on your demo setup, then compare:
| Check | What to confirm |
|---|---|
| TradingView Alerts → Log | Direction, License ID, final symbol and parameter values are correct. No unresolved placeholders remain. |
| Portal → Bridge | The same message arrived and its processing result is visible. |
| Broker account | The intended account has the expected direction, volume and stops, with no duplicate or unintended reverse trade. |
On Edge: select the instance in Portal → Edge → Experts / Journal using the hosted log walkthrough, then check positions or history on the same broker account in its MT5 app or terminal. On your own terminal: use that terminal’s logs and positions. A processed message is not proof of a broker fill. Use Troubleshoot an alert to find where the path stopped, or EA errors when a processing error is shown.
- Wrong message or trade? Pause the alert in TradingView’s Alerts panel before changing and testing it again.
- Changed script inputs? A running alert keeps the saved script version and inputs. Delete the old alert, create a new one, and check for duplicate old alerts before testing again.
- Several symbols or timeframes? These single-chart methods need a separate alert for each one. Verify each destination.
Check before continuing:
- The strategy’s intended entries and exits reached every demo recipient.
- Account, symbol, trade size and any stops match what you intended.
- You have removed test alerts that could duplicate the requests.
Try a guided example
Section titled “Try a guided example”The Logistic Regression walkthrough uses named Buy and Sell conditions. The SuperTrend walkthrough uses messages generated by Pine Script.


