Skip to content

NinjaScript: Building Custom ATM Strategy

It's early morning. Your algorithm just captured a move on ES futures while you were still asleep, but the exit logic is still stuck in manual mode. Wha...

It's early morning. Your algorithm just captured a move on ES futures while you were still asleep, but the exit logic is still stuck in manual mode. What if you could delegate that risk management to custom ATM exits that adapt to market volatility in real-time? The core benefit of integrating ATM Strategies into your NinjaScript is the ability to separate entry signals from exit management. This architecture allows your code to focus purely on identifying high-probability setups while the ATM handles the complex mechanics of stops, targets, and trailing logic. According to NinjaTrader's official documentation, there is a clear line between a NinjaScript Strategy and an ATM Strategy. The NinjaScript strategy generates the entry signal and then hands off the execution aspects to the ATM. Key fact: ATM Strategies operate in real-time only and will not execute on historical data, meaning they cannot be backtested in the standard Strategy Analyzer. This distinction is critical for developers. When you call the AtmStrategyCreate() method, the standard strategy parameters like EntriesPerDirection or IsExitOnSessionCloseStrategy do not apply.

Related Products

volumeprofilepro | drawalert | alvanor

Back to Blog | Indicators | Strategies | About