How to Setup an Automated Trade System From NinjaTrader to ZeroLine Trader

There are several reasons why someone might want to use ZeroLine Trader over NinjaTraders built in Trade Management software. You may like Zeroline Trader's trade management software over Ninjatraders ATM software because it is easy to use and you can customize your strategies in Zeroline Trader to your liking. You may also be using Zeroline Trader over NinjaTrader because you don't want to pay to have to use NinjaTrader but you like the charts and strategies that you've designed. Many people will install NinjaTrader and develop an automated trade system but never go live with it because of the extra fee's it costs to use NinjaTraders Trade management software. If you are client of Interactive Brokers there is a simple way around those fees by using another 3rd party application to manage the trade like ZeroLine Trader.

What you can do is setup an automated trade system in NinjaTrader and instead of using NinjaTrader trade management software, you send an email out to ZeroLine Trader to place the trade for you, and then ZeroLine Trader sends the order to Interactive Brokers. Using the Perl script I've written, and with a little bit of coding, this is a very simple setup and gives you a fully functional automated trade system for Ninjatrader through Interactive Brokers without the extra cost of having to own Ninjatrader or pay the extra cost for placing each trade. Having the automated trade system run directly through Ninjatrader to Interactive Brokers will be slightly faster and may be slightly easier to setup; however, using ZeroLine Trader as a middleman to save on the extra fee's may be worth it.



Here are the Downloads you will need-

  • NinjaTrader

  • Charting and Trading Platform

  • ZeroLine Trader
  • - Trade Management Software

  • Mailenable
  • - Free Mail Server

  • ActiveState Perl
  • - Free Scripting Software

  • HPT's ZeroLine Trader Perl Script
  • - An email client that checks your email and enters a trade into ZeroLine Trader when a new alert is found in NinjaTrader

  • Interactive Broker’s TWS Demo
  • - A Free Demo account with Interactive Brokers

  • Visual C++ 2005 from Microsoft
  • -This is software required by the InteractiveBrokers API to register properly

    Automated Trade System From NinjaTrader to Bracket Trader to Interactive Brokers

    This is a Video I made showing automated trades being sent from NinjaTrader to Bracket Trader to Interactive Brokers

    NinjaTrader Connect- Login Failed


    Ever have a problem connecting to your data feed when using Ninjatrader while simultaneously using QuoteTracker? If you have quotes running on QT before you connect to your data feed on Ninjatrader you may get a connection login failed. In order to resolve this, stop the quotes in QT, then restart Ninjatrader and connect your data feed in Ninjatrader first, then start quotes in QuoteTracker.

    NinjaTrader Debugging with Visual Studio 2008 Tutorial YouTube Video



    You need to use a professional addition of Visual Studio or if you use the Express edition you will need to follow the steps outlined here-

    www.ninjatrader-support2.com/vb/showthre ad.php?t=15671&highlight=visual+studio

    If you have Visual Studio 2005 or 2008 Professional follow these steps-
    Step 1- Enable Debugging in NT
    Step 2- Bring up a chart and apply the indicators and strategies you want to debug (add your indicators and strategies to the chart)
    Step 3- Open Visual Studio (2005 or 2008 Professional Edition)
    Step 4- Go to "Tools" and select attach to process and select NinjaTrader.exe (the title should be a chart- ie ES 5min)
    Step 5- In Visual Studio open file and go to your ninjatrader directory and select the ".cs" files you want to debug.
    Step 6- Add Break points on your selected file (you must add breakpoints in order to debug)
    Step 7- Go to your open NT chart and right click and select "reload ninjascript"
    Step 8- Visual studio should now pop up going from "running" to debugging" mode and should be focused on your first breakpoint.
    Step 9- Add watch points and press F5 to step through.

    Remember when debugging that you need to have 1 chart up with the indicators and strategies you want applied to the chart and the debugger starts stepping through at the very first bar on the chart (not the last bar). It is helpful to "add watch" on selected "indicators" and "time" when debugging.

    Zenfire Data Feed for NinjaTrader is faster than Interactive Brokers Youtube Video

    HPT compares the two data feeds- ZenFire is notably faster giving tick by tick data where as IB gives 0.2 to 0.3 second snap shots of the data. ZenFire T&S is even faster if you change the timer refresh rate to FALSE by right clicking T&S and changing properties.

    Starc Bands indicator for Ninja Trader

    STARC Bands- These bands are around an SMA line, with the width calculated as the ATR (Average True Range) for the period.

    Starcbands on Ninjatrader chart compared to quotetracker chart-
    Indicator settings- To displace the bands back a fixed number of bars, go to the indicator settings.
    Indicator code for Starc bands


    Free Starc Bands indicator download for ninjatrader

    ADX BollingerBandwidth CCI Indicator



    I made a variation of the CCI indicator that also takes inputs from ADX and Bollingerbandwidth. You can change any of the parameters for the inputs. The indicator looks a lot like the CCI indicator except on big moves and trending moves, where the ADX and bollingerbandwidth give extra weight to the indicators movement.


    I put all the indicators I make available to you in one folder at Mediafire.

    Download HPT's Free NinjaTrader Indicators