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

Avoid strategy being stopped due to Overfill

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

    Avoid strategy being stopped due to Overfill

    Hello Support,

    Every now and then overfill happens. Although my strategy detects it and issue new target and stop, to avoid disaster scenario, but NT disables the strategy after that.

    How can we avoid it being disabled?

    Thanks.

    Best Regards,
    Edward K.

    #2
    Hello Edward K,

    To avoid your strategy being disabled when an overfilled is detected you will need to use the unmanaged approach and set IgnoreOverFill to true. Here is a link to our Help Guide that goes over the IgnoreOverFill that you may view.
    JCNinjaTrader Customer Service

    Comment


      #3
      Hello JC,

      Changing to unmanged approach would require substantial mod of my strategy code. What I am asking is what is NT default overfill handling that disable it, hence I can override it since I already handle it myself.

      Thanks.
      Best Regards,

      Edward K.

      Comment


        #4
        Hello Edward K,

        Using the Managed Approach NT will automatically disable the Strategy if an Overfill is detected and there is not a way to override this. To have a strategy not be disabled you would have to set the IgnoreOverFill to true and use the Unmanaged Approach.

        If you would like to continue to use the Managed Approach you can use some advanced handlers and the managed framework to be able to check for situations in order to prevent Overfills from happening so that your strategy will not be disabled. Here is a reference sample that goes over how to use the IOrder, OnOrderUpdate, and OnExecution to be able to check for if an order is canceled or filled before placing another order.

        The OnOrderUpdate() and OnExecution() methods are reserved for experienced programmers. Instead of using Set() methods to submit stop-loss and profit target orders, you can submit and update them manually through the use of IOrder and IExecution objects in the OnOrderUpdate() and OnExecution() methods. The OnOrderUpdate()
        JCNinjaTrader Customer Service

        Comment


          #5
          Hello JC,

          I already uses IOrder and OnOrderUpdate, has my own order handling framework. I have been doing long enough to conclude overfill is unavoidable hence needs to be managed when happens, which my code does. It is unavoidable plainly because market moves as we issue orders. What I mean is that overfill happens, because there is a probability we only detects it afterwards. If market moves and I get an update on existing order, I would have handled it, before issuing new orders! But the strategy did not not get order update and it gets new Entry Signal, we cannot wait whether an OrderUpdate is coming. So my conclusion is that overfill is unavoidable.

          But unmanaged order is just too much hassle. So NT should make available Override facility which will make this plain simple to handle. OR provide ability to turn off "disable strategy when overfill detected". This should not be too much to ask?! This needs to be addressed by the product manager.

          Thanks.

          Best Regards,
          Edward K.

          Comment


            #6
            Hello Edward K,

            I will forward your suggestion to our Development Team for future consideration.

            Let us know if we can be of further assistance.
            JCNinjaTrader Customer Service

            Comment


              #7
              Hello JC,

              I need the follow up on this issue. How can I do that?

              Just to be sure, exactly I am suggesting is expose a Global bool variable that user strategy can set to false, to turn off "disable strategy when overfill is detected". If it is not there yet, create one and let us know.

              I do not believe doing Unmanaged can resolve this issue. It is not going to tell a strategy that overfill is "Going To Happen" before it happens! Still it should be managed when it happens. And that my strategy can already handle.

              Thanks.

              Best regards,

              Edward K.

              Comment


                #8
                Hello Edward K,

                Once it is assigned a Suggestion ID, I will give it to you so you can follow up with this at a later time.

                Going Unmanaged will let you do your own handling since it lets you have the flexibility and freedom from any order handling rules so you can set the IgnoreOverFill so that NinjaTrader will not automatically disable your Strategy so that you can have your own handling for this event. The only trade off is that you have to code the order handling manually so that it will you can account for each situation.
                JCNinjaTrader Customer Service

                Comment


                  #9
                  Hello Edward K,

                  Thank you for your suggestion on how we can improve our product. It has been inserted into our tracking system with the unique ID # 1601.
                  JCNinjaTrader Customer Service

                  Comment


                    #10
                    Hello JC,

                    Thanks for the update.

                    How often are suggestions reviewed?
                    Eg. Can I check in one or two weeks?

                    Can we have a page in the forum where we can track the suggestion progress, eg. reviewed, accepted or decline, reasons, if accepted when is expected completion, and when it goes into production release, etc.

                    This is another suggestion.

                    Thanks.
                    Edward K.

                    Comment


                      #11
                      Hello Edward K,

                      I do not believe there is an exact time frame when Suggestions are reviewed, but it is most likely that on each upcoming release suggestions are reviewed and considered.

                      To track the Suggestion ID you would want to send a note to support [at] ninjatrader [dot] com with the Suggestion ID.

                      Thanks for your feedback.
                      JCNinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Klaus Hengher, Yesterday, 03:13 AM
                      2 responses
                      15 views
                      0 likes
                      Last Post Klaus Hengher  
                      Started by Sebastian - TwinPeaks, Yesterday, 01:31 PM
                      2 responses
                      13 views
                      0 likes
                      Last Post Sebastian - TwinPeaks  
                      Started by wbennettjr, 07-15-2017, 05:07 PM
                      16 responses
                      2,530 views
                      1 like
                      Last Post eladlevi  
                      Started by Human#102, Yesterday, 09:54 AM
                      2 responses
                      8 views
                      0 likes
                      Last Post Human#102  
                      Started by Patlpp, 08-16-2021, 03:10 PM
                      10 responses
                      499 views
                      0 likes
                      Last Post Joerg
                      by Joerg
                       
                      Working...
                      X