Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Setting the disable/enable of automatic order cancellation via code

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

    Setting the disable/enable of automatic order cancellation via code

    Hi,

    Under the Options for Ninjascript there are check boxes for enabling/disabling the automatic cancellation of a NinjaScript strategy's entry & exit orders when the strategy is disabled:

    Click image for larger version

Name:	options.jpg
Views:	523
Size:	60.4 KB
ID:	1040710

    May I know if this can be set via code as well? Or is the only way via the checkboxes in the Options window?

    Thanks.

    #2
    Hello Vypre,
    Thanks for your post.

    There will be no way to set those properties through NinjaScript. Although there are ways to cancel orders programmatically when the strategy terminates.

    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Ok, we can't set these settings, but can we get?
      It is highly important for the security purposes to know, for example, would protective orders be cancelled on exit or not.
      fx.practic
      NinjaTrader Ecosystem Vendor - fx.practic

      Comment


        #4
        Hello fx.practic,

        There is currently no supported/documented way to get or set these properties. You can try exploring the NinjaTrader.Core.Globals object however as noted this is not supported/documented subject that I can detail.


        Please let me know if I may be of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        37 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, Yesterday, 02:41 AM
        0 responses
        17 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        25 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        40 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        34 views
        0 likes
        Last Post CarlTrading  
        Working...
        X