Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Best methods to make strategy check to avoid in flight executions?

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

    Best methods to make strategy check to avoid in flight executions?

    Hi:

    What methods can be used to include in strategies to avoid in flight executions before it executes (i.e. initial buy or sells, special exits, stops, etc etc)?

    Thank you.

    #2
    Hello birdog,

    Thank you for your post.

    In what scenarios are you looking to avoid In Flight Executions? On start up of the strategy?
    Are you looking solely at the strategy's orders or the account's orders as well?

    Comment


      #3
      Well, strategies that run very smooth with no errors on overfills etc on normal bars types like 1 min, 5 min, 60 min. But, once on lower time frames overfills begin to happen (i.e. 1000 tick, unirenko 2,10,4, range bars, etc) overfills happen. I am currently using unirenko 2,10,4 and am trying to fix it with that just FYI. I suspect in flight execution issues. It is not really on strat startup. So, I would say account orders in a live and or a server side account with MBTrading. It detects overfills on those lower time frames.

      So, I am looking for a solution to avoid these overfills (which I suspect are in flight executions because others of sited this as a issues) and that it works perfectly with no overfills on larger time frames. Looking for a function or check or something to be able to add to the strategy to avoid this so the strategies (1) does not overfill (2) does not disable the strategy.



      Originally posted by NinjaTrader_PatrickH View Post
      Hello birdog,

      Thank you for your post.

      In what scenarios are you looking to avoid In Flight Executions? On start up of the strategy?
      Are you looking solely at the strategy's orders or the account's orders as well?

      Comment


        #4
        Hello birdog,

        Thank you for your response.

        To ignore over fills to avoid the strategy being disabled you can use IgnoreOverFill: http://www.ninjatrader.com/support/h...reoverfill.htm

        Over-Fills is a serious issue that can occur when using complex entry conditions that bracket the market in both directions end up with both entries being filled instead of one being cancelled. Over-Fills can also occur when you place a trade quickly hoping to close a position while a prior order to close the same position already had an in-flight execution. The exact scenarios in which an over-fill can occur is highly dependent on the specific strategy programming. By default, NinjaTrader will protect against over-fills even though you are using the Unmanaged approach by halting the strategy, but should you decide to custom program your own over-fill handling it is up to you to either prevent over-fills from being a possibility in your code or by introducing logic to address over-fills should one occur.

        Comment


          #5
          Hi @PatrickH, Thanks. Could you show a couple of examples of potential code logic that may prevent avoid overfills?
          Originally posted by NinjaTrader_PatrickH View Post
          . . . or by introducing logic to address over-fills should one occur.

          Comment


            #6
            Hello birdog,

            Thank you for your response.

            We do not have any reference samples for custom over fill detection/avoidance. Each system is specific and the most basic example of avoiding over fills would be a strategy that only took one position for one order at a time, and waits until flat to submit another order. I would like to mention that over fills cannot be 100% avoided in all cases. The best method is to avoid competing orders that take positions in opposite directions. In addition, if you are using IgnoreOverFill you are going to need to use the Unmanaged Approach for your orders: http://www.ninjatrader.com/support/h...d_approach.htm

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            649 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            370 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            109 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            574 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            576 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X