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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        68 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        39 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        63 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X