Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple orders in Ninja Script

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

    Multiple orders in Ninja Script

    Is it no possible to place more than one order at a time in a Ninja Script? I'd like to ladder my orders to get filled on the way up or down depending on which way the market trades. but I want my order to be placed all at once. For instance

    Buy at 810, 808, 806, etc...

    Is is possible to just have NT place these orders through one Ninja script?

    Brian

    #2
    Brian, it is most definitely possible to place more than one order at a time.

    Code:
    if (your conditions are true)
    {
        EnterLongLimit(810, "long1");
        EnterLongLimit(808, "long2");
        EnterLongLimit(806, "long3");
    }
    If you do decide to have multiple entry orders, you'll need to bump up the max entries per direction, or set it to unique orders. See the attached picture to get an idea of what I mean.
    Attached Files
    AustinNinjaTrader Customer Service

    Comment


      #3
      additional questions on multiple orders

      Hi There,
      I used the code you provided and it worked great for issuing multiple orders. However, is there a way that I can change the quantity per level? Perhaps I would like the default quantity of 1 on 810, but 2 on 808 and 4 on 806.. Can you please help me with this?

      if (your conditions are true)
      {
      EnterLongLimit(810, "long1");
      EnterLongLimit(808, "long2");
      EnterLongLimit(806, "long3");
      }

      Thanks,
      Jeff

      Comment


        #4
        Sure, just use the EnterLongLimit overload then that provides the quantity parameters for this to be customized - http://www.ninjatrader-support.com/H...LongLimit.html

        Comment


          #5
          One more nudge on multiple orders

          Hi Bertrand,
          Thanks for the response. I tried to make sense of that page, but no luck. Could you please give me a little more guidance on how to change the order quantity for the multiple orders? Sorry for my ignorance!!!

          Thanks,
          Jeff

          Comment


            #6
            Jeff, sure please try -

            Code:
             
            if (your conditions are true)
            {
            EnterLongLimit(3, 810, "long1");
            EnterLongLimit(2, 808, "long2");
            EnterLongLimit(1, 806, "long3");
            }
            Where the first parameter is your custom quantity for each order.

            Comment


              #7
              1:

              EnterLongLimit(300, 810, "long1");
              EnterLongLimit(200, 808, "long2");
              EnterLongLimit(100, 806, "long3");

              -----if these orders are filled, any command to exit( close ) all positons at one time ?


              2 if EnterLongLimit(300, 806, "long3") is filled partially ( for example, only 150 ),
              what command to exit(close) this partially filled order ?

              Comment


                #8
                You can specifiy an emtpy fromEntrySignalName in your Exit call so the full position is exited then.



                For order would expire if not filled within the bar it was submitted on, for more control you can work with the IOrder objects:

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                630 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                364 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                105 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                566 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                568 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X