Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Banding limit order rejected on the NQ 09-20 ON 07 23 2020

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

    Banding limit order rejected on the NQ 09-20 ON 07 23 2020

    Hello Support,

    I was trading with an automated strategy and I received an error message that an order was rejected because it was outside the banding limits. My strategy uses ATM with OCO bracket.

    Several things happened. So I have several questions.

    1. From the chart text and marker, I could see that 3 trades were placed from market open and closed out properly by the strategy. Only 3 trades were allowed by the strategy as Number of trades per day is limited by the Strategy and stops trading . So this not a problem with strategy performance. But 2 more entry orders were placed near the stop loss of the last strategy order and on the Orders page, where there is a column to show the source of an order, called Strategy, was entirely blank! So I cannot find the source of these unauthorized orders. Both were losses and closed out.

    Need to know the source of these orders who placed them. The Platform or CME or a Glitch?

    2. I checked the CME website link for Banding limits and it says these limits are not valid for stop loss market orders but only for limit orders. My ATM stop loss is only 10 points away on the NQ. So the banding error must apply only to either entry limit order or the profit target. But no valid trade (the first 3 trades) was missed or flattened so it doesn't make sense WHICH ORDER WAS REJECTED.?I was not trading manually, so the only order that can be rejected is a strategy order. But all strategy orders were accounted for with entry and stop loss filled?

    3. What can I do to add a protection to the Automated strategy so that iF an ATM order or a OCO order is rejected, the account should be flattened and no more orders are placed from any source. I cannot have unauthorized orders placed.


    Any light shed on these questions, is very much appreciated.

    Thank you for your support.

    sourcem









    #2
    Hello sourcem,

    A banding limit or error such as 'Order price is outside bands, 'Difference between stop and limit price is larger than banding value', is due to the price of the order. This can be caused if an order's price is too far from the market price and can occur of the limit price of a stop limit is too far from the stop price.

    Contact your broker to inquire what the limits are for your particular broker on how far away from the market price and how far away from the stop price a limit price can be set.


    The Strategy Performance Orders display would also show rejected orders.



    You can also print the order object in OnOrderUpdate() and get information about the prices used for the order.



    If an order is marked External in NinjaTrader, this would be an order placed outside of NinjaTrader. If it is not marked external, you would be able to see the order being submitted on the Log tab of the Control Center.


    The RealtimeErrorHandling.StopCancelClose would disable the strategy, cancel any working orders, and close any position opened by the strategy upon an order rejection.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Chelsea,

      Thank you for your response.

      I will check out the links you sent. I have also contacted my broker to find out the PBV for this instrument.

      After the order was rejected, what is puzzling is the additional orders that were placed. Why would banding limits rejection would ever do that? None of the orders were marked External or anything in NT, as I mentioned that column was blank.

      thanks,
      sourcem

      Comment


        #4
        Hello sourcem,

        Where these orders working before the rejection?

        Was the strategy disabled?

        Was this an order to flatten the strategy position as the strategy was disabled?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi ChelseaB,

          Here are the answers to your questions.

          1. Please see attached rejection error message. The order at 10677 was rejected. But since my computer was unattended, there could have been an earlier rejection, too. and then error message timed out. Because the chart shows 2 unauthorized orders were placed about an hour earlier and then two more unauthorized additional orders were placed right after the shown rejected order hit its stop loss. That is puzzling since if it was rejected, why does it show the rejected order filled and went to ATM stop loss? Can you look at my log files to see what really happened?

          2.No. It has built in code to stop opening new positions after number of trades per day = 3 is satisfied.

          3. No. It was a standard strategy entry limit order with entry at 10677 shown, though it shouldn't have been taken, since it was past the 3 trade limit and got filled anyway??!!!

          sourcem
          Attached Files

          Comment


            #6
            Hello sourcem,

            If you would like your log and trace files reviewed, or any time you want an order investigated, you will need to send an email to platformsupport [at] ninjatrader [dot] com.

            The forums is better suited for asking for education and instruction, and not suited to our staff investigating a specific order.


            What is the RealtimeErrorHandling set to with this strategy?
            If an order submitted by a NinjaScript Strategy was rejected and the strategy is using RealtimeErrorHandling.StopCancelClose and the strategy did not become disabled we have an issue.
            If you are using RealtimeErrorHandling.StopCancelClose, are you able to reproduce this behavior where the strategy is not disabled after a rejection?


            When you say an order is not authorized, is this because you did not enable the strategy? (If you were to enable a strategy and the strategy submitted an order, this would be an authorized order as you did enable the strategy)
            If the order is unexpected, then you should debug script to understand the behavior using Prints and TraceOrders.


            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hi ChelseaB,

              1. The strategy is using ATM commands and all standard strategy properties are not supported.

              Strategy just calls ATM methods.

              The programmer is using this link.



              ( I personally am not familiar with RealTime ErrorHandling, can you clarify what I need to get done to prevent these additional orders after rejection?,
              I can add a method to check if ATM entry order was rejected and stop next attempts to place an order.
              But only an entry order, if there was stop or profit rejection, it is not possible then.)

              2.

              Comment


                #8
                2. On the second point, by unauthorized, I meant, that these additional orders were violating the strategy feature of not placing any new orders after the number of trades per day have been satisfied. That is all. Strategy is not disabled at that point, as I saw it, but no longer opening new positions. This feature has been checked both in a live sim account and in playback and it is working fine and no need to debug.

                In this case, these unauthorized orders happen only when there is a rejection. Hope this answers your question.

                Please help.

                Thanks,
                sourcem

                Comment


                  #9
                  Hello sourcem,

                  Thank you for posting the additional details here.

                  The RealtimeErrorHandling would be what controls what happens when a rejection is seen. If your script is programmed to ignore rejections that could let it continue trading when a rejection happens. That would be something you can review with the developer to see how or if it was programmed to account for rejections. If so that logic would need to be debugged by the developer in this case if it stops working correctly after a rejection.

                  I look forward to being of further assistance.
                  JesseNinjaTrader Customer Service

                  Comment


                    #10
                    HI ChelseaB,

                    Is there a link which provides a step by step instructions to add the coding to my strategy for ReltimeErrorHandling?

                    I would like to add this myself instead of hiring a programmer.

                    I am not familiar with Ninjascript but I can add coding lines that are generic.

                    Thank you,
                    sourcem

                    Comment


                      #11
                      Hello sourcem,

                      There is not a step by step guide for that specifically, what Chelsea had linked previously would be the guide for that property. Based on the other details you provided about using ATM orders this also may not apply to your strategy. This is going to be a situation where it will likely be best to contact the original developer to see what was created and to report the situation.


                      I look forward to being of further assistance.
                      JesseNinjaTrader Customer Service

                      Comment


                        #12
                        Thank you, Jesse.

                        As suggested, I am working with a developer to add to the code, the protection from Order rejection. I am also changing the strategy from ATM based to non ATM based.

                        I also contacted the broker and confirmed 2 things....

                        1. Order rejection was by the exchange and it was an entry order outside the Band variation.

                        2. Price Band Variation for my instrument NQ was 12 points either way.

                        This is still puzzling.

                        1. There are many auto and manual strategies which after a price level is reached, wait for a retracement to enter the trade. My own strategy has carried out lots of trades where my entry order is 20 to 40 points from market value with no rejection! Why only in this instance a rejection message?

                        I need to know, so I may have to change the logic of my entry parameters , to avoid this in the future.

                        2. According to the description in your help pages, when the order is rejected, it is cancelled. However my chart, the rejected order was filled and the OCO stop exited with a loss????? How did this happen?

                        3. Also, as I understand this, if an order is rejected due to PBV, the strategy is automatically disabled, meaning no new orders are placed. Does this happen only to non ATM based strategies? If so, this will be solved when I change the strategy.
                        Last edited by sourcem; 08-09-2020, 09:49 PM.

                        Comment


                          #13
                          Hello sourcem,


                          There are many auto and manual strategies which after a price level is reached, wait for a retracement to enter the trade. My own strategy has carried out lots of trades where my entry order is 20 to 40 points from market value with no rejection! Why only in this instance a rejection message?
                          If the rejection was from the broker that would be based on the situation and would be something you would need to speak with your broker about. I couldn't really comment here as I don't have the full details to go over that situation. You could take 1 example order where you think it should have had a rejection and then ask the broker to compare those two orders for more details.


                          2. According to the description in your help pages, when the order is rejected, it is cancelled. However my chart, the rejected order was filled and the OCO stop exited with a loss????? How did this happen?
                          This is also a situation which we would need specific details on the orders placed and logic used to be of assistance. You will likely need to consult with both your broker and also the developer here to better understand what was happening overall at that time. Based on the limited information here it is possible this relates to using ATM's or some other logic that was being used, I couldn't really say without more specifics. Generally we would suggest to work directly with your developer and if they are having difficulty with some situation you have encountered they could follow up on the forum with more details on the code used at that time. That type of information would be necessary in locating the problem.


                          3. Also, as I understand this, if an order is rejected due to PBV, the strategy is automatically disabled, meaning no new orders are placed. Does this happen only to non ATM based strategies? If so, this will be solved when I change the strategy.
                          That should only occur with NinjaScript based orders not ATM. A strategy using ATM orders simply issues a command to start another external strategy, that holds no relevance to what your NinjaScript strategy is doing.



                          I look forward to being of further assistance.
                          JesseNinjaTrader Customer Service

                          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