NinjaTrader

Overview

Lune Auto Trader connects directly to your local NinjaTrader 8 desktop software, allowing for seamless and automated trade execution from your TradingView strategies. This integration enables you to leverage NinjaTrader's powerful execution capabilities and its support for a wide range of brokers and prop firms.

For the integration to work, both Lune Auto Trader and NinjaTrader must be running on the same computer.

Features

Supported Asset Classes

  • Futures

Limitations

  • Windows OS Required: This integration requires a Windows operating system, as NinjaTrader 8 is a Windows application.

  • Local Application: The NinjaTrader 8 desktop application must be running on the same computer as Lune Auto Trader for the connection to be active.

Prerequisites

Before you begin, please ensure you have the following:

  • Lune Auto Trader installed and running.

  • NinjaTrader 8 installed on your computer. You can download it from the official NinjaTrader Website.

  • You have a trading account, prop firm, or broker that you can connect to within NinjaTrader.

Setup Guide

Follow these steps to configure and connect NinjaTrader with Lune Auto Trader.

Step 1: Install NinjaTrader

If you haven’t already, install NinjaTrader by downloading it from the official website: NinjaTrader Download.

NinjaTrader supports both NinjaTrader logins and Tradovate accounts, making it compatible with a wide range of user preferences and prop firm setups.

Step 2: Configure NinjaTrader for Automation

Before using Lune Auto Trader, you need to configure NinjaTrader to allow automated trading:

  1. Launch NinjaTrader.

  2. Click on the “Tools” tab in the top navigation, and then click "Options".

  3. Under the “General” section:

    • Enable “Multi-provider” mode.

  4. Navigate to “Automated Trading Interface” under Categories:

    • Enable the “AT Interface” checkbox.

    • Ensure the Server Port is set to 36973.

    • Click OK to save the changes.

Step 3: Set Up Your Data Connection in NinjaTrader

Your NinjaTrader platform needs to be connected to a data feed to place trades. This is usually your brokerage or prop firm account.

  1. In the NinjaTrader Control Center, go to Connections > Configure.

  2. Add and set up the connection for your specific broker or prop firm.

    • Note: If you are using a prop firm, you must contact their support team for instructions on how to add their data feed as a connection in NinjaTrader.

  3. After configuring, go back to the Connections menu and select your new connection to activate it. You should see a green light at the bottom of the Control Center indicating a successful connection.

Step 4: Configure Lune Auto Trader

Next, enable and test the connection within Lune Auto Trader.

  1. If Lune Auto Trader was running while you configured NinjaTrader, please close and re-open it.

  2. Click on the Platforms button in the main window and select NinjaTrader from the list.

  1. In the NinjaTrader Configuration window, make sure that NinjaTrader is enabled.

  1. Verify that the NinjaTrader Host and NinjaTrader Port fields are correct. The default port is 36973.

  2. Click the Test NinjaTrader Connection button to confirm that the two applications are communicating successfully.

  3. Click Save.

Click Add Account (top of the interface) and add your account.

When adding a trading account:

  • Use the exact account name as it appears.

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

Your setup is now complete. You can begin automating your strategies.

Best Practices

  • Prevent NinjaTrader Disconnections: NinjaTrader platforms can sometimes disconnect accounts automatically after a certain period (timeout). This can interrupt automated trading and potentially cause errors or missed trades.

    • Preventative Measure: A good practice is to manually disconnect and then reconnect your trading accounts within the NinjaTrader platform at least once every 24 hours. This simple action resets the connection timer and significantly reduces the chance of unexpected timeout disconnections interfering with Lune Auto Trader.

Support

For issues related to the NinjaTrader platform itself, such as account connections or data feeds, please contact their support team.

Last updated

Was this helpful?