Getting Started With the NinjaTrader Strategy Builder

By NinjaTrader Team

The NinjaTrader Strategy Builder makes it possible to design, test, and deploy automated futures strategies—no coding required. Whether you’re exploring algorithmic trading or just looking to test ideas in a risk-free environment, this built-in tool can help you build trading strategies without having to learn programming. 

This guide walks through what the Strategy Builder is, when to use it, and how to get started designing your own automated futures strategies directly in the NinjaTrader platform. 

What is the Strategy Builder? 

The Strategy Builder is a powerful, no-code tool built into NinjaTrader Desktop that allows traders to create custom strategies using a simple, guided interface. Instead of writing code, you’ll use drop-down menus and checkboxes to define your entry and exit signals, set conditions, apply indicators, and control risk. 

Whether you're refining a futures trading strategy or testing new ideas, the Strategy Builder can help you automate your approach based on real-time and historical market data. 

When to use the Strategy Builder 

The Strategy Builder is ideal if you: 

  • Want to automate a simple or moderately complex trading strategy 
  • Need to test your ideas using historical data before going live 
  • Don’t have programming experience and want to create rule-based strategies 
  • Want a visual, guided workflow for building futures strategies 
  • Need to iterate and tweak strategies quickly without editing code 

If your strategies become more advanced—like incorporating machine learning models or complex intermarket logic—you may eventually explore NinjaScript (NinjaTrader's C#-based programming language). But for many traders, the Strategy Builder offers more than enough flexibility to automate effectively. 

How to access the Strategy Builder 

To open the Strategy Builder in the NinjaTrader Desktop: 

  1. From the Control Center, go to the Tools menu. 
  2. Select Strategy Builder from the dropdown. 
  3. When prompted, choose to create a new strategy or edit an existing one. 

You’ll then enter a step-by-step workflow where you can define strategy parameters, conditions, actions, and more. 

Tip: You can save your strategies and test them in NinjaTrader’s sim environment before enabling them in a live market. 


How to define your strategy 

Before jumping into the Strategy Builder, it helps to outline the basic logic of your futures trading strategy. Think of this as setting up your “blueprint,” so when you start building, you know exactly what you want your strategy to do. 

Here are a few key elements to define: 

Trading objective 

Start with a simple goal. Are you aiming to capture short-term momentum, trade trend reversals, or stay active during specific market sessions? Your objective will help guide your entry and exit rules. 

Entry signal 

What should trigger a trade? Common entry conditions might include: 

  • A moving average crossover (e.g., 10-period simple moving average (SMA) crosses above 20-period SMA) 
  • A relative strength indicator (RSI) crossing a specific level (e.g., RSI rises above 30) 
  • Price breaking above or below a recent high or low 

You can use one condition or combine several for a more refined setup. 

Exit logic 

When should the trade close? You might: 

  • Use a stop-loss and profit target 
  • Exit based on an opposite signal (e.g., a moving average crossover in the other direction) 
  • Set a time-based rule (e.g., exit after a set number of bars) 

These decisions can help control risk and define the life cycle of a trade. 

Risk controls 

Consider how much you're willing to risk on each trade. The Strategy Builder lets you: 

  • Set fixed stop-loss and profit target levels (in ticks or price points) 
  • Define the number of contracts per trade 
  • Limit trading to certain hours or market conditions 

With these core elements in place, you’ll be ready to bring your strategy to life using the step-by-step tools in the Strategy Builder. 

 

Step-by-step: How to build your first strategy 

Let’s walk through a basic example: A strategy that goes long when the 10-period simple moving average (SMA) crosses above the 20-period SMA, and exits when the reverse crossover happens. 

  1. Start the Strategy Builder: 
    • Open the Strategy Builder from the Tools menu in the Control Center. 
    • Click New Strategy, and give your strategy a name. 
  2. Set default properties: 
    • Assign basic info such as description, number of contracts, and calculation type (e.g., on bar close). 
    • Choose whether the strategy should execute on real-time or historical data. 
  3. Define inputs (optional): 
    • Add customizable variables like SMA period lengths or stop-loss size. This can help you adjust without editing the full logic. 
  4. Add conditions and actions: 
    • In the Conditions and Actions section, define your entry logic: 
      • Condition: 10 SMA crosses above 20 SMA 
      • Action: Enter long position 
    • Then define your exit logic: 
      • Condition: 10 SMA crosses below 20 SMA 
      • Action: Exit long position 
  5. Configure stops and targets: 
    • Add a stop-loss and profit target if desired. You can specify these as fixed ticks or use a trailing logic. 
  6. Compile and test: 
    • Click Finish to compile your strategy. 
    • You can now backtest it in the Strategy Analyzer or run it in your sim environment on a chart. 

Once your strategy is saved, you can clone it to create variations or enhancements without starting from scratch. 


Start automating your strategy ideas

The NinjaTrader Strategy Builder gives you the flexibility to bring your trading ideas to life, whether you’re building simple crossover strategies or refining multi-indicator setups. By reducing the technical barriers, this no-code solution can help you focus on improving your futures trading strategy and automating what works. 

Ready to test your first strategy? Open the NinjaTrader Desktop platform and explore what’s possible today with the Strategy Builder. Don’t have a NinjaTrader account? Open one today.

Open an Account