Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Shutting down a strategy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Shutting down a strategy

    Hi, I have a weird request. In certain situations, I'd like to shut down a strategy.

    It's easy to just tell Ninja Trader to not trade a stock for the rest of the day, but I'd also like to disable the strategy so it's easy for me to know that this strategy isn't trading this stock, so I can remove the strategy and add another one with a different symbol.

    I have two workaround solutions:
    1. Send a message to the output window announcing that the strategy won't trade for the remainder of the day so I can manually disable the strategy.
    2. Issue an illegal transaction, like placing a short limit one dollar above the current price or reference an array item outside the array bounds. This (or something like this) will upset NT so much that it will shut down, but I'd like to do something a little more graceful.

    Any ideas?

    #2
    Try Disable():

    Comment


      #3
      Awesome! That's exactly what I was looking for. Thanks!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      72 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      39 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X