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:	519
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 argusthome, 03-08-2026, 10:06 AM
        0 responses
        94 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        49 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        31 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        34 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        70 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X