Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ShortLimit & LongLimit at the same time

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

    ShortLimit & LongLimit at the same time

    Hi,

    Is it possible to place a LongLimit and ShortLimit at the same time ?

    Regards

    #2
    Hello,

    Thank you for your forum post.

    Yes this is possible, and should you have one an EnterLongLimit fill when your short NinjaTrader will automatically make you long instead of flat, this is due to the managed approach.

    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      I can't find a way to program this : http://www.imagup.com/pics/1285614369.html in my strategy

      To have a LongLimit and ShortLimit at the same time in my orderbook?
      Could you help?

      regards

      Comment


        #4
        Hello,

        Please post your code you are using for entry and I will be able to further assist.

        You will need to continually make the call every bar for EnterLongLimit and EnterShortLimit until these orders are filled.

        Let me know if I can be of further assistance.
        BrettNinjaTrader Product Management

        Comment


          #5
          I have done this but if my LongLitmitOrder is place it does not take into account the ShortLimitOrder :

          Code:
          protected override void OnBarUpdate()
                  {
             if(Historical)
              return;
             else if(Bars.BarsSinceSession < 5)
              return;
                
             if(Position.Quantity == 0)
             {
              EnterLongLimit(myPrice + 2 );
              EnterShortLimit(myPrice - 2]);
             }
             
             
              
              
              
                  }
          thc

          Comment


            #6
            Hello,

            EnterShortLimit(myPrice - 2]);

            You have a ] in here is this causing us issues?
            BrettNinjaTrader Product Management

            Comment


              #7
              No this is not an issue

              Comment


                #8
                Hello Smuhr,

                In this case you would be running into our internal order handling rules.

                Methods that generate orders (excluding market orders) to enter a position will be ignored if:
                • <LI class=rvps1>A position is open and an order submitted by an exit method (ExitLongLimit() for example) is active and the order is used to open a position in the opposite direction <LI class=rvps1>A position is open and an order submitted by a set method (SetStopLoss() for example) is active and the order is used to open a position in the opposite direction
                • The strategy position is flat and an order submitted by an enter method (EnterLongLimit() for example) is active and the order is used to open a position in the opposite direction

                In order to place both entry orders at same time you would have to use an unmanaged approach in version 7. An introduction to this is here:
                http://www.ninjatrader.com/support/helpGuides/nt7/unmanaged_approach.htm
                Ryan M.NinjaTrader Customer Service

                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