Connect a TradingView alert
Where to paste the webhook URL and message in TradingView, for indicators and strategies.
TradingView sends your alert to PipRoute through a webhook. Webhooks need a paid TradingView plan.
Every account has its own webhook URL
The webhook URL ends with the account's license, for example https://piproute.com/hook/AC280BEC72C2. That is how PipRoute knows which MT5 account the trade is for. Copy it from step 3 of Connect MT5, from 1. Webhook URL in the Alert builder, or from Settings, MT5 accounts. A group has its own webhook URL on the Multi-account page. https://piproute.com/hook alone, without a license, only works with a message from the Alert builder.
First: which kind of indicator do you have?
In TradingView click the alarm clock, pick your indicator under Condition and look at the box below it.
- Any alert() function call: the indicator writes its own buy, sell and close messages. Make one alert, leave Message as it is, and paste only the webhook URL. In the Alert builder this is My indicator's own alert.
- Names like Buy, Sell, Long or Short: the indicator only gives the signal. Make one alert per action with the message from the Alert builder (An indicator).
- Your strategy, with Order fills: one alert follows the whole strategy, with the message from the Alert builder (A strategy).
For an indicator with Buy and Sell signals
- In the dashboard open Alert builder, choose An indicator and pick the action, for example Buy.
- In TradingView click the alarm clock to create an alert. Under Condition choose your indicator and the signal for this action.
- Paste the alert message from the Alert builder into Message.
- Open Notifications, tick Webhook URL and paste the account's webhook URL. Press Create.
- Make a second alert for the opposite action, for example Sell.
For an indicator that sends its own alert
- In TradingView create an alert. Under Condition choose your indicator, then Any alert() function call.
- Leave Message as it is. Some indicators hide that box, which is fine.
- Open Notifications, tick Webhook URL and paste the account's webhook URL. Press Create. This one alert covers buy, sell and close.
- To be sure PipRoute reads it, open the Alert builder, choose My indicator's own alert, and paste one of the indicator's messages into Check a message. PipRoute reads its own format and the
signalTypemessages (MarketBuy, MarketSell, CloseBuy, CloseSell, CloseAll) that many indicators send.
For a strategy
- In the Alert builder choose A strategy. One alert then follows the whole strategy: it buys, sells, reverses and closes as the strategy does.
- In TradingView create the alert with your strategy as the condition and choose Order fills only.
- Paste the message and the webhook URL as above.
Check it worked
Every alert that reaches PipRoute shows on Activity within a second, with what MT5 did. If TradingView's alert Log shows the alert went out but Activity shows nothing, the webhook URL is wrong. See "Where to see what happened to an alert".