Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Two simultaneous limit orders

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

    Two simultaneous limit orders

    Hi,
    I'm trying to develop a script that at a certain time sends 2 limit orders together, a buy and a sell.
    It seems that it always reads only the first instruction and ignores the second, I tried also to write 2 condition sets but the second part is ignores:
    Code:
    If (Totime(Time[0]) >= ToTime(10,20,0)
    && ToTime(Time[0])< ToTime(13,35,0)
    && Close[0] < Level1Short)
    {EnterShortLimit(DefaultQuantity, Level1Short,"SE1");}
    If (Totime(Time[0]) >= ToTime(10,20,0)
    && ToTime(Time[0])< ToTime(13,35,0)
    && Close[0] > Level1Long)
    {EnterLongLimit(DefaultQuantity, Level1Long,"LE1");}
    Doing this it enters short but ignores the long entry instruction that might reverse the position. Could you please help me finding out what's wrong?
    Thanks, bye
    Smodato

    #2
    You cannot place simultaneous working orders in the opposite market direction. You can only place one. If the price moves closer to the other, cancel the first and place in the second.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      You cannot place simultaneous working orders in the opposite market direction. You can only place one. If the price moves closer to the other, cancel the first and place in the second.
      Thansks for your reply, where is actually the limitation to place simultaneous limit orders in opposite directions, in the order entry system or in the program? It means could I place them manually if I needed?
      To cancel and insert the opposite depending on where the price is located has a risk to send many orders and cancellations if the interval between the two levels is pretty small, is there no other workaround for this limitation (if it depends on the script limitations obviously)?
      Thanks, bye
      Smodato

      Comment


        #4
        This is a necessary programming limitation. Manually you can do whatever you want.


        Bottom of the page.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Hi,

          in the new version of ninja trader 7 are two simultaneous limit orders possible?

          Thanks

          Comment


            #6
            Frodo,

            Yes, you can place limit orders wherever you see fit. You can have multiple simultaneous working limit orders too.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              ... but is it also possible in the new version of ninja trader to place simultaneous two limit orders in the opposite market direction?

              Please have a look on this chat here. This problem was already ask in 2009. Has anything change?

              Thanks

              Comment


                #8
                Frodo,

                It was always possible to place orders in opposite directions. You just have to do so from separate strategies. This is still the case. If you want to use the same strategy you can use the Unmanaged order management approach newly available in NT7 to achieve so as well.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_Josh View Post
                  ... You cannot place simultaneous working orders in the opposite market direction. You can only place one...
                  I know this is from an old thread, but the quote above is relevant to an issue I currently have:
                  I understand that you CAN (in NT 6.5) place simultaneous working orders in opposite directions if one of these is an EXIT order for a currently held market position (e.g. an order to exit a long position) and the other is an ENTRY order that would effectively increase the currently held position (an order to increase the long position).

                  Is this correct?

                  Comment


                    #10
                    Correct, the internal order handling rules would trigger if you wanted to reverse your position (not adding only to the current one)

                    Comment

                    Latest Posts

                    Collapse

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