Connect TradingView
Get your private webhook URL and point a TradingView alert at your automation.
Each automation gives you a private webhook URL. You paste it into a TradingView alert, and TradingView calls it every time the alert fires. This page walks the full connection, from copying the URL to saving the alert.
What you need#
- A Lune automation, with its target accounts and sizing already set. See Create an automation.
- A TradingView plan that allows webhook alerts.
- Two-factor authentication turned on in TradingView. TradingView requires 2FA before it lets you send a webhook.
Webhook alerts are a paid TradingView feature, and TradingView will not enable them until 2FA is on. Both are set on TradingView's side, not in Lune. Check your TradingView plan and account security if the Webhook URL field is greyed out.
Connect the alert#
In Lune, open your automation and copy its private webhook URL.
On your chart in TradingView, create an alert on the strategy or indicator you want to automate.
In the alert's Notifications tab, turn on Webhook URL and paste your Lune URL into the field.
In the Message box, enter the alert message Lune expects. See the Alert message reference for the exact format.
Save the alert. When it fires, Lune receives the signal and places the order on every account you targeted.
Your webhook URL is a private credential. Anyone who has it can send trade signals to your accounts. Never share it, never post it in a screenshot, and never paste it into a public forum or chat. If it leaks, create a new automation to get a fresh URL.
When you change strategy settings#
TradingView ties an alert to the exact strategy settings that were active when you created it. If you change your strategy's inputs later, the old alert keeps using the old settings. Recreate the alert in TradingView after any settings change, so your automation runs the version you actually want.