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

Ultimate handling for rejected stops...how?

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

    Ultimate handling for rejected stops...how?

    I am trying to ensure that I robustly handle any rejected stop orders when they are placed on the wrong side of the market due to fast moving markets.

    For real-time, I overrode the default error handler, and then submit it as a market order.

    However, this code does not fire in backtesting...so I implemented a basic check of:
    if (price == stop price) then market order entry, else stop order entry.

    That seems to work, but my question really is how to best code so that the same code will be used for both real time and backtesting?

    Is that possible, or is my solution above the recommended method?


    And, will NT7 simply have a built in option to handle rejected stops so that they can be resubmitted as market orders or should I just add the default override of the error handler for all my systems?

    I am porting from TS because I am tired of their inability to handle rejected stops btw...so this is quite a key issue for me.

    Thanks

    #2
    SIFTrader,

    Since backtesting is different than real-time, the approach you used will be the one to take.

    If you wish to control it to become a market order I would recommend programming the logic yourself.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      SIFTrader/Josh:

      Can you point me to any link on how to override the default error handler?

      I need to take care of exactly the same situation.

      This is one of the most pernicious problems when trading some instruments because often the exchange (e.g. GLOBEX) will cancel your order instead of executing it as you intended!

      Thanks

      Comment


        #4
        Hello,

        I will have someone reply to you on Monday. Thank you for your patience.
        DenNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Ben View Post
          Hello,

          I will have someone reply to you on Monday. Thank you for your patience.
          Bump...
          This is an important topic in any robust system so any pointers will be useful

          Comment


            #6
            aviat72, sorry for our delay - you can turn off auto error handling by setting RealTimeErrorHandling to TakeNoAction - http://www.ninjatrader-support.com/H...rHandling.html

            Of course it's your responsibility then to properly account for all scenarios involved.
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Belfortbucks, Today, 08:21 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by ETFVoyageur, Today, 02:15 AM
            2 responses
            19 views
            0 likes
            Last Post ETFVoyageur  
            Started by EliIsrael, Today, 08:15 AM
            1 response
            7 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by cshox, Yesterday, 11:11 AM
            4 responses
            23 views
            0 likes
            Last Post cshox
            by cshox
             
            Started by lorem, 04-25-2024, 09:18 AM
            21 responses
            90 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X