Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Orders rejected by broker due to order sequence?

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

    Orders rejected by broker due to order sequence?

    In the last few weeks, I have been running into a problem with order rejections from my broker (MBTrading). In discussions with them, it seems to be happening when my strategy tries to reverse a position. The sequence of order submission is placing the new position entry order BEFORE closing the previous position. In my case, I keep a minimum balance and having my pending orders basically doubled/tripled in size triggers a rejection and then disables my strategy.

    As part of this event, I also get a note from NT that an overfill has occured.

    Any suggestions?

    Thanks.
    Last edited by billr; 01-25-2011, 06:21 AM.

    #2
    Bill, overfills usually occur when trading too close to the inside market with multipe working orders changing state - http://www.ninjatrader.com/support/h...d_approach.htm - think of it like the inflight execution concerns.

    For the reverse issue with MBT - does it only happen when you're Long?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Not sure. this time is was from a long position trying to close and go short.

      I don't know enough about the unmanaged topic to understand your reference. Sorry. It is something I can fix without going to unmanaged programming?

      Comment


        #4
        What method sequence are you using? On long equity positions, you for example can't submit an ExitLongLimit() followed by an ExitLongStop() as the second order will be rejected since MBT tags it as an order to reverse your position, the same applies to using SetProfitTarget() and then later on using SetStopLoss().

        You do not have to go unmanaged, this link just provides a discussion of the topic of overfills and how to address it - you would need to review the sequence of events leading to the overfill to be able to understand how to improve the strategy. Unmanaged would just provide finer options here for you to selfhandle this situation in code.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Oh, I didn't know that about the SetProfitTarget and SetStopLoss issue. I have a strategy that uses SetProfitTarget and SetStopLoss initially, then may move StopLoss to new level as Position Profits hit targets. Sort of a very basic version of a one step trailing stop. Could that be causing this?

          Thanks Bertrand.

          Comment


            #6
            Hi Bill,

            Yes, it can happen when there are several working orders close to the market. As part of your stop loss modification, you may consider adjusting the remaining profit target so that both orders aren't near the market.

            Make sure also that your profit targets and stop losses refer to a specific fromEntrySignal.
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              The problem with that is by definition, reversing a position includes several orders that are close to market. If I send you my ninja script, can you tell me whether you see this problem inherent in how my positions are entered?

              If not, do you have an example of how to handle closing an open position and entering a new position when strategy wants to reverse an open position?

              I am not well versed enough in NS to try implementing an unmanaged state.

              Thanks.

              Comment


                #8
                Bill, we could take a look at your trace / logs to help you understand what's happening, unfortunately we would not be able to debug / modify the code - overfills and in-flight executions are an inherent risk in electronic trading, for best ways to address them through code the unmanaged mode needs to be used, as it could ignore overfills coming in so the strategy is then not shutdown as part of the strategy error handling.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  I understand you can't de-bug. But I would like to sent you logs/trace to see what you think.

                  Comment


                    #10
                    Sure, I just got them and will take a look into.
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      Bertrand, did you ever get a chance to check my logs/trace to see what might have been happening?
                      Thanks.

                      Comment


                        #12
                        I believe so and replied to your email - have you checked your inbox? If not, please let me know and I'll try to resend it.
                        BertrandNinjaTrader Customer Service

                        Comment


                          #13
                          I don't think I received that email, or accidentally deleted it. (It was the same time you and I had discussed my ranting about MBT, so I may have been mixing them up with delete??

                          So if you still have it, a re-send would be appreciated.
                          Thanks.
                          Bill

                          Comment


                            #14
                            o worries, will see if I can find it still and resend to you.
                            BertrandNinjaTrader Customer Service

                            Comment


                              #15
                              ...for example can't submit an ExitLongLimit() followed by an ExitLongStop() as the second order will be rejected since MBT tags it as an order to reverse your position, the same applies to using SetProfitTarget() and then later on using SetStopLoss().
                              Could you explain why the SetProfitTarget and SetStopLoss cannot be used? Thanks.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by rocketman7, Today, 01:00 AM
                              0 responses
                              1 view
                              0 likes
                              Last Post rocketman7  
                              Started by wzgy0920, 04-20-2024, 06:09 PM
                              2 responses
                              27 views
                              0 likes
                              Last Post wzgy0920  
                              Started by wzgy0920, 02-22-2024, 01:11 AM
                              5 responses
                              32 views
                              0 likes
                              Last Post wzgy0920  
                              Started by wzgy0920, 04-23-2024, 09:53 PM
                              2 responses
                              74 views
                              0 likes
                              Last Post wzgy0920  
                              Started by Kensonprib, 04-28-2021, 10:11 AM
                              5 responses
                              193 views
                              0 likes
                              Last Post Hasadafa  
                              Working...
                              X