Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

order rejected cancelled, ignored

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

    order rejected cancelled, ignored

    I have seen a situation where a my strategy stops/closes out per things happen ing when placing stops and profit targets,, sometimes "trace orders" says ignored, rejected etc. but message that the strategy was closed is a t killer.

    Seems like I need a strategy to monitor the strategy.

    Don't think I every had an entry order fail..... but sometimes no or profit target .... yeeeeks


    Don

    #2
    Don,

    Can you please be more specific as to the exact error message that was hit to force a halt to your strategy?
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Amp, Buy stop or buy stop limit orders can't be placed below the market. affected Order: Buy 2 Stop @ 1197
      4/14/2010 9:42:59 AM|0|128|Strategy 'FluxAuto/3e461f1145324b10b75731e3309a3b56' submitted an order that generated the following error 'OrderRejected'. Strategy has sent cancel requests, attempted to close the position and terminated itself.
      4/14/2010 9:42:59 AM|1|128|Disabling NinjaScript strategy 'FluxAuto/3e461f1145324b10b75731e3309a3b56'
      4/14/2010 9:47:00 AM|1|128|Disabling NinjaScript strategy 'FluxAutoRange/080e7e54e58b4e529ab80be81178181b'

      Don't have anything in my strategy right now that checks for OrderRejected ..
      This is NT 7 .14if it makes a difference

      Comment


        #4
        Don, you would need to ensure the strategy is submitting proper orders at proper stop prices, as such you need to ensure you don't try submitting a BuyStop/Stoplimit orders below the current price, as this would result in rejections.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          I'm concerned the part of message: " Strategy has sent cancel requests (this must have been an automatic process), attempted to close the position and terminated itself (why ?)"
          Thats kinda drastic for a rejected order dont ya think??? Return code was valid,,, not out of memory no other errors. If I can break this, and I'm not tricky,, this needs some investigation... Good code has to do when things go wrong,, not when everything is perfect.....

          Comment


            #6
            Don,

            Order rejections will terminate a strategy. This is expected behavior. I would not say this is drastic. If you are running a strategy and the rejected order was your stop loss if we did not stop your strategy you would be completely unprotected. Should the market drop with no stop loss in place you would have considerable losses. There is no way NinjaTrader knows what you want to do when an order is rejected and as such the only safe procedure for NT is to stop the strategy. It is unsafe to continue as is; any reconciliation order NT may try to place may not be what the user wants.

            There are two options you can do.

            1. Address your code to not submit orders that would be of invalid prices and be rejected.
            2. Use RealtimeErrorHandling = RealtimeErrorHandling.TakeNoAction;
            With this off, when errors occur like rejections NT will not do anything. If you decide to go with this route you will need to ensure you program contingency plans to your strategy when errors do occur otherwise you may have the potential to realize some drastic losses to your trading account for uncovered error cases.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              I don't understand ur reasoning stopping the strategy makes this worse, since I cant check the return code and exit my open positions or change my stop order....
              If u are going to stop the strategy, u need to close any open positions associated with the strategy.. Your statement makes no sense,,, since u dont place the stops in the Iexecution until u have a good fill... So u have positions in the market with no stops,,,,if the stop order fails.... thats terrible......

              Comment


                #8
                gg80108,

                When you trigger something that would halt the strategy it does close all open positions and cancel all working orders.

                If you want to handle it yourself, please use RealtimeErrorHandling.
                Josh P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by ezrollin, Today, 08:51 PM
                1 response
                21 views
                0 likes
                Last Post bltdavid  
                Started by Rubix, Today, 09:31 PM
                0 responses
                15 views
                0 likes
                Last Post Rubix
                by Rubix
                 
                Started by ark321, Today, 05:12 PM
                1 response
                21 views
                0 likes
                Last Post NinjaTrader_EricB  
                Started by futurenow, Today, 09:08 PM
                0 responses
                4 views
                0 likes
                Last Post futurenow  
                Started by fafafdenis, Today, 04:56 PM
                1 response
                5 views
                0 likes
                Last Post NinjaTrader_EricB  
                Working...
                X