Automate TradingView Strategies Guide

Overview

Lune Auto Trader allows users to automate their TradingView strategies by integrating them with our supported platforms. 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

Prerequisites

Before starting, ensure the following:

  • You have an active Lune Auto Trader license.

  • Your TradingView account is set up and has access to the TradingView 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

  1. Launch Lune Auto Trader and ensure the platform of the account you want to automate is configured and connected.

  2. Click Add Account (top of the interface) and add your account I you haven't already.

    When adding a trading account:

    • Use the exact account name as it appears on your platform.

    • ⚠️ Account names are case-sensitive. Double-check for capital letters or spaces.

  3. Click the Config button next to your connected account.

  4. In the account configuration window:

    • Click Add Strategy.

    • Set a name (e.g., strat1).

    • Select the instrument (e.g., ES JUN25).

    • Choose how many contracts to trade.

  5. Save your strategy settings.

Step 2: Open Strategy Instructions

  1. In the account configuration window, click the Instructions button.

  2. 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

  3. Click Copy next to each alert to store it for use in TradingView.

If you're using an external or custom TradingView Strategy, ensure you configure the correct alert messages according to your strategy's actions. So set up alerts such that, when entering a long trade, the appropriate entry long alert message is used. As long as you are using the correct alert message and webhook url it will work with Lune Auto Trader.

Step 3: Configure Your Strategy on TradingView

  1. Open TradingView and add the strategy you want to automate to your chart.

  2. Click the settings icon (⚙️) to open the strategy settings.

  3. Scroll down to the Alert Configuration section and paste the corresponding alert messages from Lune Auto Trader into relevant 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

    Your settings should look like this:

  4. Click OK to save your changes.

Step 3: Create Alerts in TradingView

  1. In TradingView, click the Alert (⏰) icon at the top.

  2. Under Messages:

    • Make sure that messages Is set to {{strategy.order.alert_message}}

  3. Under Notifications:

    • Enable Webhook URL.

    • Paste the Webhook URL from your strategy instructions.

  4. Click Create.

Security Reminder

🔒 Your alert messages and webhook are sensitive credentials. If shared or leaked, others can execute trades on your behalf.

Always:

  • Keep alert messages, instructions, and webhooks private

  • Revoke access if compromised (contact support)

Troubleshooting

Trades Are Not Executing on my Account

If your TradingView alerts are firing but no trades are appearing, check the following:

  • Check the alert settings on TradingView: Ensure your alert message is set to {{strategy.order.alert_message}} and that your webhook url is correctly set. If it still does not try creating the alert again.

  • Incorrect Account Name: The account name in Lune Auto Trader must exactly match the name in your trading platform. For example, Account1 is different from account1. Account names are case-sensitive.

  • Platform Connection: Ensure your trading platform is properly connected. For NinjaTrader, the application must be running locally. For API-based platforms like Tradovate or ProjectX, ensure your API keys are correct and active.

  • Incorrect Webhook/Alert Messages: The alert messages in your TradingView strategy must be copied exactly from the instructions provided within Lune Auto Trader for your specific strategy configuration.

My TradingView Strategy is Not Taking Trades or Firing Alerts

If your TradingView Strategy is not taking any trades or firing alerts, check the following:

  • Strategy Settings Are Too Strict: Your filter settings or signal thresholds within the TradingView strategy might be too restrictive for the current market conditions, preventing any signals from being generated.

  • Order Size Is Not Configured Correctly: For some markets your TradingView Strategy's "Properties" settings must bet set to "Quantity". If its set to something else then it may not work. For example in the Futures it does not take any trades unless you set the Order Size to "Quantity".

Last updated

Was this helpful?