Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi Insturment Orders

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

    Multi Insturment Orders

    I have a quesion about how to enter a multi-instrument order. The help guide shows the following for multi-instruemnt long exits.

    ExitLong(int barsInProgressIndex, int quantity, string signalName, string fromEntrySignal)

    My question is how do I enter a ExitLong for a specific barsInProgressIndex for the entire position.

    If I enter ExitLong( 0 , , "signalName", "") it does not work.

    Thanks

    #2
    Hello Double Bogie,
    You have not entered any volume. Please use the below overload to Exit the orders for respective bars array.
    ExitLong(int barsInProgressIndex, int quantity, string signalName, string fromEntrySignal)


    A sample code will be like:
    Code:
    ExitLong(0, 1, "MyExit", "MyEntry");
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Thanks Joydeep, but my question was how do I implement the following from the web page you listed.

      If you do not specify a quantity the entire position is exited rendering your strategy flat.

      I want to exit the entire position without specifying a specific quantity for a barsInProgressIndex order.

      Thanks.

      Comment


        #4
        Hello Double Bogie,
        You must specify the quantity. The code will not compile if you do not do so.

        You can use the below code to do it.
        Code:
        ExitLong( 0 , Positions[0].Quantity, "signalName", "");
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          Thanks, that is what I needed.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          647 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          369 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          108 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          572 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          573 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X