Tutorials / Tradingview Alerts
Connect a TradingView alert to MT5
Point your own alert at Diehard Trader, in five steps.
Before you start
- An MT5 connected on Your MT5: see Connect your MT5.
- A paid TradingView plan, Essential or higher. The free plan has no Webhook URL field.
The five steps
- 1
Create an alert
In TradingView, open your chart and the Alerts panel, and create a new alert.
- 2
Set the condition
Whatever you choose to trade on: your strategy, your indicator or a price cross.
- 3
Paste the webhook URL
In Notifications, tick Webhook URL and paste the URL from Setup Guide.
- 4
Paste the message
Paste the alert message from Setup Guide into the Message box. Yours has your license and secret filled in.
- 5
Create
Each time the alert fires, TradingView sends the message to us. We check it's really from you and pass it to your EA, which places the trade, usually within a second or two.
What the message looks like
This shows the format only. The symbol and numbers are examples, not a suggestion.
{
"license": "<license key>",
"secret": "<webhook secret>",
"id": "{{timenow}}",
"symbol": "XAUUSD",
"action": "BUY",
"lots": "0.01",
"sl": "200",
"tp": "400"
}- For a sell alert, change
BUYtoSELL. - Change
symbolto the symbol the alert trades, andlotsto your size. - Leave
idas{{timenow}}. TradingView fills in the time, so the same alert arriving twice while the first is still waiting only runs once.
Your webhook secret is private. Anyone who has it could send alerts to your terminals. If it leaks, rotate it on the License page.
Related
This is how the software works, for education only: not investment advice, and not a recommendation to buy or sell anything. Symbols and numbers are examples of the format. Trading is risky. Diehard Trader carries out alerts and rules you set yourself.