NinjaTrader 8 gives you two very different ways to put stops and targets on a trade. One is an ATM Strategy, the template you pick from the Chart Trader or SuperDOM dropdown. The other is a NinjaScript strategy, code that decides when to enter and manages its own exits. Both can move a stop to breakeven. Both can trail. So traders ask the obvious question: which one should actually run my trades?
The answer depends on who is making the decisions. If you click the entry, an ATM Strategy is built for you. If code makes the entry, you usually want the code to own the exits too. And there is a hybrid, where a NinjaScript strategy launches an ATM template, that looks like the best of both and comes with traps the documentation spells out plainly. This guide walks through all three, using NinjaTrader's own Help Guide as the source for every rule.
What an ATM Strategy Is
ATM stands for Advanced Trade Management. NinjaTrader's Help Guide describes an ATM Strategy as "a collection of orders that represent your entries, exits, stops and targets," plus sub-strategies that control how those orders are managed after the fill. The page lists Stop Strategy, Auto Breakeven and Auto Trail under the ATM Strategy section, and Auto Chase, Auto Reverse and Shadow Strategy under Advanced Options.
The key point is who it was built for. The Help Guide says it directly:
ATM Strategies are "designed to provide discretionary traders with semi-automated features to manage their positions." (NinjaTrader 8 Help Guide, Advanced Trade Management)
Semi-automated is the right word. You decide to enter. The template places a stop and target the moment you are filled, then moves the stop according to the rules you saved. If you want to drag the stop, you can. If you want to close half the position by hand, you can. The Help Guide is also clear that using one is optional. Asked whether you have to use an ATM Strategy, its answer is "Absolutely not."
What a NinjaScript Strategy Is
A NinjaScript strategy is C# code that runs inside NinjaTrader. It reads bars or ticks, decides when to enter, submits its own orders and decides when to exit. Nothing waits for a click.
Most strategies use what NinjaTrader calls the Managed Approach, which its documentation says is "designed to offer the greatest ease of use for beginner to intermediate programmers." Inside it, methods like SetStopLoss(), SetProfitTarget() and SetTrailStop() let you "predefine a stop loss, trailing stop and/or profit target in a strategy." When an entry fills, those exits are submitted as live orders and linked as OCO (one cancels other), so a filled target cancels the stop and the other way around.
The Managed Approach also enforces what NinjaTrader calls Internal Order Handling Rules. Their stated purpose is to "prevent situations in real-time in which you may have multiple orders working to accomplish the same task." In plain terms, they stop a strategy from accidentally stacking conflicting orders and ending up with a bigger position than it meant to hold.
The biggest practical difference is testing. The Strategy Analyzer, per the Help Guide, lets you "run historical analysis on your NinjaScript based automated trading strategies," which includes backtests, optimization and walk-forward optimization. Your entries and your exits are tested together, on the same data, with the same logic that will run live.
ATM Strategy vs NinjaScript Strategy at a Glance
| Question | ATM Strategy | NinjaScript Strategy |
|---|---|---|
| Who decides the entry? | You, from Chart Trader or SuperDOM | The code |
| Who manages the exits? | The saved template, plus you | The code |
| Built for | Discretionary traders (semi-automated) | Fully automated trading |
| Can it be backtested? | No. Real-time only | Yes, in the Strategy Analyzer |
| Optimization and walk-forward | Not available | Available |
| Requires coding | No | Yes (or the Strategy Builder for simple logic) |
| Manual adjustment mid-trade | Expected and easy | Possible, but the code may fight you |
The Hybrid: Calling an ATM Strategy From NinjaScript
NinjaScript has a method called AtmStrategyCreate(). Its documentation says it "submits an entry order that will execute a specified ATM Strategy." You pass it the order action, order type, prices, time in force, an order ID, the name of a saved ATM template and an ATM strategy ID. Your code finds the signal, and a saved template handles the stop, target, breakeven and trail.
NinjaTrader describes the intended use of this setup clearly: to "programmatically monitor and generate an entry signal and then manualy manage the resulting open position" in an order entry window like the SuperDOM. In other words, it is a signal generator with hand-managed exits, not a fully automated system. NinjaTrader ships a sample called SampleATMStrategy with the platform if you want to see it in code.
It is a real tool with a real use. It also changes how the strategy behaves in ways that catch people out. Here is what the documentation says about each one.
1. It cannot be backtested
The AtmStrategyCreate() page states the method "is NOT backtestable and will NOT execute on historical data." The Using ATM Strategies page repeats it: "ATM Strategies operate in real-time only." The documented example even returns early in OnBarUpdate() until the strategy reaches real-time.
That means the exit side of your system, often the part that decides whether it makes money, never touches the Strategy Analyzer. You can backtest the entry logic with a stand-in exit, but you are not testing what will actually run.
2. The strategy does not see the ATM's position or P&L
From the documentation: "Executions from ATM Strategies will not have an impact on the hosting NinjaScript strategy position and PnL." The strategy's normal position tracking does not monitor them, and its performance stats leave them out. If your code checks Position.MarketPosition to decide whether it is flat, that check does not know the ATM trade exists. Daily loss logic based on the strategy's own performance figures will not count those trades either.
3. Several strategy settings stop applying
The Help Guide says strategy setup parameters "such as EntriesPerDirection, EntryHandling, IsExitOnSessionCloseStrategy do not apply" to orders placed through AtmStrategyCreate(). Two of those matter a lot for automation. EntriesPerDirection is what normally stops a strategy from stacking extra entries. IsExitOnSessionCloseStrategy is the setting many traders rely on to be flat at the session close. Neither one protects ATM trades.
4. ATM executions do not plot on the chart
Executions from an ATM Strategy created inside NinjaScript will not plot on the chart during real-time operation. When you review the day, the chart will not show you what the strategy did.
5. Closing it the wrong way closes everything
This one is easy to miss. The documentation warns that closing an ATM Strategy the wrong way "will close the account/instrument position, terminate all strategies and cancel all orders." The correct method depends on your ATM Strategy Selection Mode. If it is not set to DisplaySelectedATMStrategyOnly, you close a single ATM Strategy with a middle mouse click on CLOSE. If it is set to DisplaySelectedATMStrategyOnly, you left click CLOSE with the ATM selected.
Why the hybrid worries us on a prop account
Put points 2, 3 and 5 together. Suppose your strategy enforces a $500 daily loss stop by reading its own P&L, and relies on exit-on-close to be flat before the bell. With ATM-launched trades, neither check sees those positions. A prop firm's daily loss or trailing drawdown rule counts every dollar on the account, whether your code saw it or not. If you use the hybrid, put your daily loss and session-end protection somewhere that reads the account, not the strategy.
Which One Should You Use?
Here is how we think about it.
Use an ATM Strategy if you trade by hand
If you pick your own entries and want consistent, fast exit management, an ATM template is the right tool. It removes the scramble of placing a stop after the fill, and it applies the same breakeven and trail rules every time. No code, no compiling.
Use a NinjaScript strategy if the system should run without you
If the goal is full automation, keep the entries and exits in the same code. You can backtest the whole thing, run it through optimization, and check it with walk-forward analysis before it ever trades live. Our walk-forward optimization guide for NinjaTrader 8 explains why that last step matters. The strategy also knows its own position at all times, which is what every safety check depends on.
Use the hybrid only with your eyes open
The hybrid makes sense when you want code to find setups and a human to manage the trade from the SuperDOM. That is what NinjaTrader designed it for. It is a weaker fit for a system you plan to leave running unattended on a funded account, because the exits cannot be tested and the strategy cannot see what the ATM is doing.
An NQ strategy that is ready to run
NQ Ultra is a ready-to-run NinjaTrader 8 strategy for NQ futures, built and tested for prop firm accounts. Skip the build and start with a strategy that has already been through the testing.
Get NQ Ultra on WhopTesting Before You Commit
Whichever route you pick, test it the way it will run.
- NinjaScript strategy: backtest it in the Strategy Analyzer with real commission and slippage settings, then optimize on narrow ranges and confirm with walk-forward. A strategy that only looks good on one parameter set is not ready.
- ATM template: since it cannot be backtested, run it on a simulation account or in Market Replay and log every trade. Our guide on testing a NinjaTrader 8 strategy with Market Replay walks through the setup.
- Hybrid: test the entry logic with a coded exit that matches the template as closely as you can, then forward-test the real thing in Market Replay. Check that your daily loss and end-of-day protection catch the ATM trades.
- All three: confirm your prop firm allows the approach. Rules on automation differ by firm, and some ban it outright. Start with our list of prop firms that allow automated trading in 2026, then check the firm's own policy page, since rules change.
Common Mistakes
- Backtesting the entry and assuming the ATM exit is fine. The exit never ran on historical data. The backtest is of a different system.
- Relying on
Position.MarketPositionwith ATM trades. The strategy's own position does not include them. - Counting on exit-on-close. IsExitOnSessionCloseStrategy does not apply to orders placed with
AtmStrategyCreate(). - Building daily loss limits on strategy P&L. ATM executions are left out of the strategy's performance.
- Clicking CLOSE the wrong way. Know your ATM Strategy Selection Mode before you need it in a hurry.
- Editing an ATM template a live strategy uses. The strategy calls the template by name. Change the template and you have changed the system without retesting it.
When a strategy suddenly behaves differently from what you expect, the cause is often one of these settings. If yours has gone quiet altogether, our checklist for why a NinjaTrader 8 strategy stopped trading covers the other usual suspects.
The short version: ATM Strategies are a great tool for traders who click their own entries. NinjaScript strategies are the tool for systems that run on their own. The hybrid sits in between, and NinjaTrader's own documentation tells you exactly where its blind spots are. Read those limits before you trust it with a funded account.