Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Cancelling All Orders

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

    Cancelling All Orders

    Any way to cancel all orders with a single method instead of having to track each one and cancel individually?

    Thanks

    #2
    paulca, there's unfortunately no supported way to achieve that in our NinjaScript, each order would need to be cancelled via an explicit CancelOrder() call to your IOrder. What use scenario do you have in mind? Would this be just a one time command for when you would disable the script for reaching a given session pnl for example?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand,

      Two scenarios:

      I have multiple entry orders and if I get an error on any order I would like to cancel all existing entry orders and suspend trading..

      I have a time limit and when I reach that limit I would like to cancel all entry orders..

      Comment


        #4
        Thanks.

        1. For error you mean a rejection? Then the real-time error handling per default would take care of canceling - http://www.ninjatrader.com/support/h...htsub=realtime

        2. Ok for this case you would need to issue a CancelOrder call for each IOrder of your entries. You could also look into the unsupported FlattenEverything call from the SuperDOM, however this would be an extreme action I feel for those scenarios.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Bertrand,

          Thank you, that handles one of my scenarios nicely.

          Paul

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Karado58, 11-26-2012, 02:57 PM
          8 responses
          14,825 views
          0 likes
          Last Post Option Whisperer  
          Started by Option Whisperer, Today, 09:05 AM
          0 responses
          1 view
          0 likes
          Last Post Option Whisperer  
          Started by cre8able, Yesterday, 01:16 PM
          3 responses
          11 views
          0 likes
          Last Post cre8able  
          Started by Harry, 05-02-2018, 01:54 PM
          10 responses
          3,204 views
          0 likes
          Last Post tharton3  
          Started by ChartTourist, Today, 08:22 AM
          0 responses
          6 views
          0 likes
          Last Post ChartTourist  
          Working...
          X