How to Test and Use Templates for Automated Trading (NinjaTrader 8)

If you’re looking to streamline your trading and optimize your profits, automated trading using NinjaTrader 8 can be a game changer. With the right templates and strategies, you can leverage automation to execute trades consistently while you focus on risk and market context.

This guide walks you through a field-tested workflow to import, test, evaluate, and use templates. From setting up simulation accounts to rotating top performers, everything you need to get started is here.


Table of Contents 🔗


Step 1: Import Trading Templates into NinjaTrader 8 🔗

Before testing, import your strategy templates so they’re available under Strategies. Use the original .zip files—don’t unzip them.

  1. Open NinjaTrader 8.
  2. Control Center → ToolsImportNinjaScript Add-On.
  3. Select the strategy/template .zip files and click Open.
  4. Follow the prompts. On success, the strategies appear in the platform.
Tip: Keep a folder of versioned template .zips so you can roll back if needed (e.g., Reversal_5m_v3.zip).

Step 2: Add Accounts for Testing 🔗

Create simulation accounts that mirror your live conditions (balance, commissions, slippage). Group them by idea/timeframe so you can compare apples-to-apples.

  1. Control Center → Accounts tab.
  2. Right-click → Add Simulation Account.
  3. Name them by use (e.g., SimReversal5min, SimTrend15min).
  4. Configure starting balance and Commission template to reflect reality.
  5. Click OK.

Step 3: Test All Templates Simultaneously 🔗

Attach all candidate templates to their designated sim account and run them at the same time. Leave the test uninterrupted for at least 3 trading days to capture a fair sample under the same market regime.

  1. Open the Strategies tab and enable the templates you want to test.
  2. Assign each template to the correct sim account (e.g., all 5-minute templates → SimReversal5min).
  3. Group by timeframe to compare cleanly: account #1 = 5m, account #2 = 15m, etc.

Running multiple template baskets in parallel by timeframe

Why batch-test? Running everything at once exposes relative strength immediately and avoids bias from changing conditions.

Step 4: Evaluate Template Performance 🔗

After 2–3 full trading days, review results. Promote only the templates that combine profitability with controlled drawdown.

  1. Open Trading Performance and review by strategy/template.
  2. Focus on net PnL (after commissions), average trade, win rate, and max drawdown.
  3. Shortlist templates with 2–3 green days and acceptable risk, then move them to your Main (live/eval) account.

Template performance snapshot (example)


Step 5: Use Templates Wisely 🔗

Deploy your winners, but be ready to rotate. No template is set-and-forget—markets change.

  • Rotate regularly: weekly checks; deeper monthly review. Bench underperformers; promote fresh sim winners.
  • Size by volatility: use ATR-based position sizing so each template risks a similar fraction of equity.
  • Optimize sparingly: test ranges in Strategy Analyzer → Optimization, then validate out-of-sample or with walk-forward.
  • News-aware: consider pausing or sizing down on high-impact releases if the template isn’t designed for that volatility.

Pro Tips & Setup Checklist 🔗

  • Commission & slippage: set realistic values so Sim mirrors live.
  • Trading hours: align strategy session templates (RTH vs ETH) with your method.
  • Correlations: diversify across symbols/timeframes to avoid concentrated risk.
  • ATMs / risk controls: ensure stops/targets are attached; cap per-template daily loss.
  • Notes: log why you promoted a template—helps you know when to rotate out.

Common Mistakes to Avoid 🔗

  • Judging on one day—insufficient sample size.
  • Over-optimizing in-sample without out-of-sample validation.
  • Ignoring commissions/slippage—gross PnL can be misleading.
  • Mismatched sessions or data—results won’t match Analyzer/live.
  • Relying on a single template for too long—don’t anchor; rotate.

FAQ 🔗

How long should I run template tests?
Run at least 2–3 full trading days for the first filter, then continue monitoring in Sim while promoting only clear winners.

Should I optimize parameters before going live?
Yes, but lightly—and always validate with out-of-sample data or walk-forward to avoid curve fitting.

Can I run multiple templates on the same account?
You can, but during testing keep them grouped by timeframe/idea on dedicated sim accounts. In production, ensure combined risk is within limits.

What commission/slippage settings should I use?
Use your broker’s schedule and typical slippage for your instrument/liquidity. Test a range to see sensitivity.

What if market regime changes quickly?
Bench laggards and promote fresh sim winners. That rotation keeps your basket aligned with current conditions.


Conclusion 🔗

Using templates for automated trading with NinjaTrader 8 is a practical way to systematize execution and compound small edges. Import your templates, run simultaneous tests for a few days, promote the consistent gainers, and rotate as conditions change. Keep risk controls tight and assumptions realistic (commissions, slippage, sessions) to ensure Sim-to-live continuity.

Back to top ↑