> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# Using ATM Strategies

You can create an automated strategy that generates a trade signal that executes a NinjaTrader [ATM Strategy](https://ninjatrader.com/support/helpguides/nt8/atm_strategy.htm).

* ATM Strategies operate in real-time only and will not execute on historical data thus they can't be backtested

* Executions resulting from an ATM Strategy that is created from within a NinjaScript automated strategy will not plot on a chart during real-time operation

* Strategy set up parameters such as [EntriesPerDirection](/developer/desktop-sdk/references/strategy/entriesperdirection), [EntryHandling](/developer/desktop-sdk/references/strategy/entryhandling), [IsExitOnSessionCloseStrategy](/developer/desktop-sdk/references/strategy/isexitonsessionclosestrategy) do not apply when calling the [AtmStrategyCreate()](/developer/desktop-sdk/references/strategy/atm-strategy-methods/atmstrategycreate) method

* Executions from ATM Strategies will not have an impact on the hosting NinjaScript strategy position and PnL - the NinjaScript strategy hands off the execution aspects to the ATM, thus no monitoring via the regular NinjaScript strategy methods will take place (also applies to strategy performance tracking)

* ATM Strategy stop orders can either be StopMarket or StopLimit orders, depending on which type is defined in the ATM Strategy Template (Advanced Options) you call in the [AtmStrategyCreate()](/developer/desktop-sdk/references/strategy/atm-strategy-methods/atmstrategycreate) method in your NinjaScript strategy. To make the distinction clear which is used, following a naming convention for the template name is highly suggested (i.e. AtmStrategyTemplate\_STPLMT)

* A general sample for calling ATM's is preinstalled with NinjaTrader under the 'SampleATMStrategy' script - for a script showing how to implement reversal type setups, please see [this link](http://www.ninjatrader.com/support/forum/local_links.php?action=jump\&catid=8\&id=866) to our online resources.

## There is a Clear Line

There is a clear line between a NinjaScript Strategy and an ATM Strategy. The use model for creating an ATM Strategy within a NinjaScript Strategy is when you want to programmatically monitor and generate an entry signal and then manualy manage the resulting open position via an ATM Strategy in one of NinjaTrader's order entry windows.

!!! IMPORTANT: Manually Closing an ATM Strategy from an Order Entry Window such as the SuperDOM
It is crucial that when running ATM Strategies created by a NinjaScript strategy that you understand how to properly manually close the ATM Strategy from any of the order entry windows.

* If the order entry window [ATM Strategy Selection Mode](https://ninjatrader.com/support/helpguides/nt8/atm_strategy_selection_mode.htm) is NOT in "DisplaySelectedATMStrategyOnly" click on the "CLOSE" button via your middle mouse button (scroll wheel)

* If the order entry window [ATM Strategy Selection Mode](https://ninjatrader.com/support/helpguides/nt8/atm_strategy_selection_mode.htm) is in "DisplaySelectedATMStrategyOnly" you can click on the "CLOSE" button with your left mouse button to close the selected active ATM strategy

Following the approaches above will internally close the ATM Strategy. Not following the approach will close the account/instrument position, terminate all strategies and cancel all orders. The result is that your NinjaScript strategy will be terminated.