Questions on Addon Startup and Trade Management Options in NinjaTrader

Hi NinjaTrader community,

I’m exploring some custom addon development and could use some guidance on a couple of technical points:

  1. Addon Auto-Start: Is there a built-in way to have an addon automatically activate when NinjaTrader starts up? I’d like it to run seamlessly without needing the user to turn it on manually each time. Any tips or methods to achieve this would be great.

  2. Controlling Trade Execution: I’m looking into ways to manage or restrict trade activity based on certain conditions, possibly for a set duration (like until the end of a session). Are there effective techniques—like monitoring orders or similar workarounds—that could accomplish this reliably, even in fast-moving markets?

I’m aiming for something stable and user-friendly, so any advice, examples, or pitfalls to avoid would be really helpful. Thanks for any input you can share!

Yes please see here: NinjaTrader Developer Community | NinjaScript Resources & Documentation

Basically OnWindowCreated is called each time a NT window is created even the control center. If its the control center you know NT has started and you can run your custom logic.

Controlling trade execution ease depends on where you want to control it, you won’t have the ability to get in front of order execution ahead of any of the NT order windows or strategies, but if you had your own order window you could do so.