Automate TradingView Strategies Guide
Overview
Lune Auto Trader allows users to automate their TradingView strategies by integrating them with NinjaTrader or Tradovate. Each strategy uses a set of unique alert messages and a webhook to automate trade actions such as entries, exits, and partial exits.
This guide walks you through how to:
Add a strategy to an account
Link TradingView alerts
Use strategy instructions (webhook + alerts)
Automate trades using Lune Auto Trader
IMPORTANT: Strategy alert messages and webhook URLs are confidential and unique to your setup. Never share this data with others. Treat it like a password.
Prerequisites
Before starting, ensure the following:
You have an active Lune Auto Trader license.
You have NinjaTrader installed and connected.
Your TradingView account is set up and has access to the strategy you want to automate.
You’ve downloaded and installed the Lune Auto Trader software.
Step-by-Step Instructions
Step 1: Add a Strategy to Your Account
Launch Lune Auto Trader and ensure your account is connected.
Click
Add Account
(top of the interface) and configure your NinjaTrader or Tradovate account if not already added.In the configuration window:
Click
Add Strategy
.Set a name (e.g.,
strat1
).Select the instrument (e.g.,
ES JUN25
).Choose how many contracts to trade.
Save your configuration.
Step 2: Open Strategy Instructions
In the strategy configuration panel, click the
Instructions
button.A window will appear containing:
Your unique Webhook URL
A list of pre-generated Alert Messages:
Long Entry
Short Entry
Long Exit
Short Exit
Long Partial Exit
Short Partial Exit
Click
Copy
next to each alert to store it for use in TradingView.
Step 3: Configure Your Strategy on TradingView
Open TradingView and add the strategy you want to automate to your chart.
Click the gear icon (⚙️) to open the strategy settings.
Scroll down to the Alert Configuration section.
Paste the corresponding alert messages into each available field:
Entry Long Alert Message
Entry Short Alert Message
Exit Long Alert Message
Exit Short Alert Message
Long Partial Exit Alert Message
Short Partial Exit Alert Message
Click
OK
to save your changes.
Step 4: Create Alerts in TradingView
In TradingView, click the Alert (⏰) icon at the top.
Under Condition:
Choose
alert() function calls only
.
Under Notifications:
Enable Webhook URL.
Paste the Webhook URL from your strategy instructions.
Click Create.
Repeat this process for each alert type if they aren’t bundled in one strategy alert.
Step 5: Finalize Strategy Settings in Lune Auto Trader
In the strategy configuration window in Lune Auto Trader:
You can customize advanced options:
Max Total Contracts
Allow Partial Exits
Enable News Trading Filter
Enable Holidays Filter
Enable Time-Based Filter
Exit Positions After Hours
Trading Start/End Time
Click
Save Configuration
to store your setup.You can also
Load
,Delete
, orSet as Default
.
Security Reminder
🔒 Your alert messages and webhook are sensitive credentials. If shared or leaked, others can execute trades on your behalf.
Always:
Keep instructions private
Never reuse webhooks across multiple strategies unless required
Revoke access if compromised (contact support)
Troubleshooting
No trades are executing
Check alert setup on TradingView. Ensure alert() function
is selected.
Webhook not working
Confirm webhook URL is pasted exactly.
Wrong instrument being traded
Double-check instrument field in Lune Auto Trader config.
Alerts not triggering
Ensure the strategy conditions are active and alert logic is enabled.
Last updated
Was this helpful?