Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exit() method has been ignored

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

    Exit() method has been ignored

    After I take a long position, I'm trying to submit an ExitLongLimit() but whenever I do, it gets rejected. The logs say:

    An Exit() method to submit an exit order at '1/3/2008 9:15:00 AM' has been ignored. Please search on the term 'Internal Order Handling Rules' in the Help Guide for detailed explanation.


    When I look this up in the help guide, it doesn't tell me anything useful. I've tried all permutations of the ExitLimit() and they all give me this. When I use just the ExitLong() methods, they all work, so it doesn't sound like there's a problem with my signal naming or anything.

    I started by using the advanced ExitLongLimit() signature and kept slimming it down to see if I was missing something. Right now, I have this in my OnBarUpdate() method:
    Code:
                if( Position.MarketPosition == MarketPosition.Long) {
                    ExitLongLimit(GetCurrentBid()-0.3);
                }
    And still I get errors in the log, the orders get rejected and my positions get stopped out or closed at the end of day. If I use just 'ExitLong();' then everything is fine.

    What's going on? I just don't get it.

    #2
    It has been ignored since likely you already have an exit order pending to exit the position.
    RayNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Ray View Post
      It has been ignored since likely you already have an exit order pending to exit the position.
      I don't think so. I'm not using the advanced order exit method to keep the order alive and just to be extra sure, in my OnBarUpdate I call:

      if( Position.MarketPosition != MarketPosition.Flat ) {
      ExitLongLimit(GetCurrentBid()-0.3);
      }

      As I said in the OP, this works just fine with ExitLong() and to be doubly-conservative, I'm shaving the bid by 0.30. Even if there's a bug in NinjaScript which isn't cancelling orders properly, the first bar after my order is entered, this should get me out of the position.

      But it never does.



      Edit: The only possible conflict I can imagine would be between ExitLongLimit and SetProfitTarget() (which I set extra wide so it wouldn't be hit). Could this be happening? And if so, why isn't this an issue with ExitLong() but only with ExitLongLimit()?

      Comment


        #4
        Originally posted by adrian View Post
        Edit: The only possible conflict I can imagine would be between ExitLongLimit and SetProfitTarget() (which I set extra wide so it wouldn't be hit). Could this be happening? And if so, why isn't this an issue with ExitLong() but only with ExitLongLimit()?
        For sure this is a problem since its an exit order. ExitLong() is not a problem since market orders are excluded from these rules.
        RayNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Ray View Post
          For sure this is a problem since its an exit order. ExitLong() is not a problem since market orders are excluded from these rules.
          So are you saying that you cannot use a limit exit if we have a profit target set?

          Comment


            #6
            A profit target is a limit exit. What I am saying is you can't have two. Just modify the profit target price instead of trying to submit another limit to exit.
            RayNinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Ray View Post
              A profit target is a limit exit. What I am saying is you can't have two. Just modify the profit target price instead of trying to submit another limit to exit.
              This is surprising considering how well the StopLoss method is able to adjust to handle partials. It also means that better OCO support is still very important.

              But yes, you are right. I tried removing the profit target and replacing with limit exits and it works. Thanks Ray.

              Comment


                #8
                I should note that, most confusing and frustrating of all, it's not enough to not set a profit target, you can't use a stop loss either. Not if you want to use limit orders anywhere to exit the strategy.

                I've tried and as long as I have a stoploss, the limit orders are always refused.

                I have a hard time understanding why we can use market exits but not limit exits when we use a profit target, but I can't imagine why we can't use a limit order when we use a stop loss.

                Comment


                  #9
                  @ adrian
                  I had the same problem and I hope that NT will change somthing!
                  I need the Limit Exit for my System and I dont now how I can place a stoporder without to use then Setstop method?
                  Last edited by Hugo1; 06-12-2008, 03:23 AM.

                  Comment


                    #10
                    The reason you can't have two is simply because of the ambiguity it could cause at the exchange/brokers end. Over at their end there is no distinction between an exit order to close a position vs a simple limit order. If you place two orders you could easily be filled on both before you are notified of the first fill. This puts you into all sorts of trouble since you now have a position in the opposite direction instead of simply closing your position.

                    If you wish to place a Limit order to exit please take a look at the reference sample section for the OnOrderUpdate() method. Simply put, you can't do both at the same time.
                    Josh P.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

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