Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Execution of a limit order

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

    Execution of a limit order

    Hi,

    I have a strategy that enters a limit order for the next day on bar close. For example, if the setup condition is met, strategy enters a long limit order 1% below the close price. If the limit is not met the next day, the strategy does not enter on that signal.

    However, on backtesting, the order is executed at the limit price even if the open is lower than the limit. Obviously, in real life the order would be executed on or near the open because it is better than the limit price.

    It makes quite a big difference to the strategy result. Is there a way to fix this?

    TIA,

    #2
    Hello aomega,

    Please see the information under 'Historical Fill Processing' at the link below.


    I suspect you are using the Default fill algorithm.

    Comment


      #3
      Hi,

      I tried the liberal fill method too but that does the same thing. The difference between liberal and default is the behavior when there is an entire bar gap down (liberal will fill at the high of the bar, default will not fill). However, if the next day bar does not gap down but nevertheless, the open price is lower than the limit, the order gets filled at the limit price rather than the open (even though the open is below the limit).

      Neither 'default' nor 'liberal' produce a realistic result in this scenario (i.e. when open price is below limit price).

      Anything else I can do?

      TIA

      Comment


        #4
        aomega,

        NinjaTrader will fill you at the limit price. This is the conservative approach required by our fill algorithms. If you want different behavior you will have to create your own fill type. Unfortunately this is not supported beyond what is outlined in this article: http://www.ninjatrader-support.com/H...FillTypes.html
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        102 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        144 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        71 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        125 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        79 views
        0 likes
        Last Post PaulMohn  
        Working...
        X