How to Set Up an Automated Trading Bot in NinjaTrader 8 (Step-by-Step Guide)
Strategy

How to Set Up an Automated Trading Bot in NinjaTrader 8 (Step-by-Step Guide)

Young Money Investments
·
March 21, 2026
·
11 min read

Automated trading in NinjaTrader 8 is powerful — but the setup process has enough steps and gotchas to trip up even experienced traders. This guide covers the complete workflow: installing a strategy file, connecting to a data feed, configuring risk parameters, backtesting, and deploying live on a VPS.

Whether you're installing a pre-built strategy like the YMI Marty Bot or KPL Bot, or testing your own C# strategy, this process is the same. Follow each step in order.

Prerequisites

Before starting, make sure you have:

  • NinjaTrader 8 installed — Download from NinjaTrader.com. The platform is free for backtesting and simulation. Live trading requires a license (~$60/month or one-time ~$1,100).
  • A brokerage connection — For prop firm trading: Apex Trader Funding connects via Rithmic; Topstep connects via Rithmic or Tradovate. For live/personal accounts: NinjaTrader Brokerage, Interactive Brokers, or TD Ameritrade.
  • The strategy file — Either a compiled .dll file (pre-built strategy) or a .cs source file (editable C# code). YMI Pro members receive pre-compiled .dll files that install in one click.

Step 1: Install the Strategy File

Trade This Systematically

Stop reading. Start executing.

Join 500+ traders using YMI's automated bots, daily KPLs, and AI trade plans — no guesswork required.

NinjaTrader manages strategies through its built-in file system. Do not manually copy files into folders — use the import wizard.

  1. Open NinjaTrader 8.
  2. Go to Tools → Import → NinjaScript Add-On.
  3. Navigate to the .zip or .dll file you received and select it.
  4. NinjaTrader will compile and register the strategy. You'll see a success message in the Output window.

If you received a .cs source file instead: go to New → NinjaScript Editor, then File → Open the file. Press F5 to compile. Any compilation errors appear in red in the Output window.

Common error: "The type or namespace 'X' could not be found." This means a dependency is missing — check with the strategy provider for any required add-ons.

Step 2: Connect to Your Data Feed

Automated strategies need live market data to function. NinjaTrader connects to data feeds through the Connection Manager.

  1. Go to Connections → Configure.
  2. Select your provider (Rithmic, Tradovate, Interactive Brokers, etc.).
  3. Enter your credentials. For prop firm accounts, use the Rithmic login credentials provided by your firm (Apex, Tradeify, etc.).
  4. Click Connect. A green circle in the bottom status bar confirms an active connection.

For NinjaTrader Brokerage users: the connection setup is the same but your credentials come from NinjaTrader directly. Rithmic credentials for third-party prop firms come from that firm's onboarding email.

Step 3: Open a Chart and Add the Strategy

Automated strategies run on a chart. The chart must remain open while the strategy is active — this is why a VPS is essential for 24/7 operation (more on that in Step 7).

  1. Right-click the instrument in the Instruments list and select Chart.
  2. Set the chart timeframe to match the strategy's requirements. Marty Bot runs on a 1-minute chart; KPL Bot uses a Range chart. Check the strategy documentation.
  3. On the chart, click Strategies (the "play" icon in the toolbar).
  4. In the Strategy Manager, click Add and select your strategy from the dropdown.

Step 4: Configure Strategy Parameters

Every strategy has configurable parameters. In the Strategy Manager, these appear as editable fields. Critical parameters to review before going live:

  • Account — Select the correct account. Double-check this. Running a live strategy on a simulation account (or vice versa) is a common mistake.
  • Quantity — Number of contracts per trade. Start with 1 micro (MES, MNQ) until you've verified the strategy behaves as expected.
  • Stop Loss — Usually expressed in ticks. Verify the tick value for your instrument: ES ticks = $12.50, NQ ticks = $5.00.
  • Profit Target — Same as stop loss. Check the strategy's target risk/reward ratio before modifying.
  • Daily Loss Limit — Maximum loss before the bot stops trading for the day. Set this to comply with your prop firm's daily drawdown rules. Always set a DSL, even if the strategy has its own internal limits.
  • Trading Hours — Restrict the strategy to specific market sessions. YMI bots default to regular trading hours (RTH), 9:30 AM–4:15 PM ET for ES/NQ.

Step 5: Backtest the Strategy

Before enabling live trading, run a backtest to verify the strategy compiles, executes trades, and produces results consistent with the developer's performance claims.

  1. In the Strategy Manager, set Backtest as the execution mode.
  2. Set the backtest date range (minimum 6 months of data; 1–2 years preferred).
  3. Ensure Fill Type is set to Default fill, not Last price fill — the latter is unrealistically optimistic.
  4. Add a commission estimate: ES round-turn commissions average $4–$6. Enter this in the Commission field.
  5. Click Run Strategy. The backtest results appear in the Strategy Analyzer tab.

What to look for in backtest results:

  • Profit Factor above 1.5 minimum, 2.0+ is strong.
  • Max Drawdown should be consistent with the prop firm's trailing drawdown limit. If max drawdown exceeds the limit, the strategy will fail evaluations.
  • Trade Count — Be suspicious of strategies with fewer than 100 trades. Too few trades means the backtest is statistically unreliable.
  • Consistency — Review the equity curve. Smooth, gradual growth is preferable to strategies that make money in one big streak.

Step 6: Enable Live Trading (Simulation First)

Never go directly from backtest to live capital. Always run a simulation test first.

  1. In the Strategy Manager, switch the execution mode to Enabled.
  2. Select a Simulation account (NT provides a default sim account — look for "Sim101" in the account dropdown).
  3. Run the strategy for 3–5 trading days in simulation mode. Verify that orders are being placed and filled as expected. Check the Orders and Executions tabs in the Control Center.
  4. Once you're satisfied, switch the account to your live or prop firm account.

Critical: When switching from simulation to live, the strategy must be stopped and restarted. You cannot change the account on a running strategy.

Step 7: Deploy on a VPS for 24/7 Operation

Running an automated strategy on your local PC means the bot stops if your computer sleeps, restarts, or loses internet. For prop firm accounts, missed trades can be costly. A VPS solves this.

Recommended VPS specifications for NinjaTrader 8:

  • OS: Windows Server 2019 or 2022 (64-bit)
  • RAM: 8GB minimum; 16GB if running 3+ strategy instances
  • CPU: 4 cores minimum
  • Location: Chicago (close to CME exchange for lowest latency) — providers: Vultr Chicago, Linode Chicago, or Cheapwindowsvps.com
  • Storage: 100GB SSD

On the VPS: install NinjaTrader 8, connect to your data feed, open the chart, add the strategy, and configure parameters identically to your local setup. Use Windows Task Scheduler to auto-start NinjaTrader if the VPS reboots.

YMI Pro members receive a complete VPS setup guide with screenshots specific to the YMI bot templates, including pre-configured ATM strategies and recommended connection settings for Apex and Tradeify accounts.

Common Problems and Fixes

Strategy Shows "Waiting for Historical Data"

The strategy needs historical bars to initialize. This usually resolves within 30–60 seconds after the market opens. If it persists, check that your data connection is active and the chart's data series matches the instrument you're connected to.

Orders Not Filling in Simulation

By default, NinjaTrader simulation only fills limit orders if price trades through the limit price (not just to it). Change the simulation fill setting in Tools → Options → Simulation if you want "touch fill" behavior. Note: touch fills are optimistic and not realistic for backtesting.

Strategy Stops Unexpectedly

Check the Output window (Control Center → New → Output Window) for error messages. Common causes: data feed disconnection, hitting the daily loss limit, or an unhandled runtime exception in the strategy code.

Duplicate Orders / Over-Trading

This usually means the strategy is running on multiple chart instances. Check that only one chart window has the strategy enabled. In the Control Center under Strategies, all active strategy instances are listed.

Skip the Setup Complexity With Pre-Built YMI Bots

If this setup process feels complex, that's because NinjaTrader 8's flexibility comes with a learning curve. YMI Pro Trader membership includes:

  • Pre-compiled, prop-firm-optimized Marty Bot and KPL Bot files (install in under 5 minutes)
  • Pre-configured ATM strategy templates for Apex, Tradeify, and Topstep accounts
  • 1-on-1 onboarding call to walk through installation and verify your setup
  • VPS setup guide with NT8-specific screenshots
  • Active Discord support from members who have already gone through this process

The goal is to get from "downloaded the bot" to "running live on a prop firm account" in under 48 hours — not 2 weeks of troubleshooting forum posts.

Related reading:

About the Author

YMI Team
YMI Team

Young Money Investments

The YMI team creates educational content on systematic futures trading, automated bots, and prop firm strategies.

Quantitative TradingFutures Specialist

Free — No Credit Card

Get Daily KPLs in Your Inbox

AI-generated Key Price Levels for ES & NQ, delivered every trading morning. Join 500+ traders who start their session with a plan.

🔒 Your information is secure. We respect your privacy and will never spam you.

Risk Disclosure & Disclaimer

Educational Purposes Only: The content provided in this blog is for educational and informational purposes only. It does not constitute financial, investment, or trading advice. Young Money Investments is not a registered investment advisor, broker-dealer, or financial analyst.

Risk Warning: Trading futures, forex, stocks, and cryptocurrencies involves a substantial risk of loss and is not suitable for every investor. The valuation of futures, stocks, and options may fluctuate, and as a result, clients may lose more than their original investment.

CFTC Rule 4.41 - Hypothetical or Simulated Performance Results: Certain results (including backtests mentioned in these articles) are hypothetical. Hypothetical performance results have many inherent limitations. No representation is being made that any account will or is likely to achieve profits or losses similar to those shown. In fact, there are frequently sharp differences between hypothetical performance results and the actual results subsequently achieved by any particular trading program.

Testimonials: Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

Ready to Apply These Strategies?

Join 500+ traders using YMI's automated bots, daily KPLs, and AI trade plans to trade systematically.

Intro Trader includes a 7-day free trial • 30-day money-back guarantee on all tiers