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 CarlTrading, 03-31-2026, 09:41 PM
          1 response
          67 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          36 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          60 views
          1 like
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          62 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