Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is it a bug?

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

    Is it a bug?

    Hi,
    How can it be?
    I developed a strategy and run a back test on it.
    On the 04/06/09 9:40 it executed a buy limit order at 835.25 and was filled at that price, but that bar high was only 830.75.
    Attached is a screen of back test.

    Regards,
    Baruch
    Attached Files

    #2
    Baruch,

    Limit orders have the potential to fill anywhere including outside of the bar. You can try using different fill algorithms if you want to see if it makes any difference.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh,
      Thanks for a quick response.
      I have several follow up questions:
      1. Attached is a trace of this order and it says "Sell limit" but "buy limit" was executed. How?
      2. Do you want to say that if I issue a limit order in a live trading I can be filled on that price even if the price doesn't reached it?
      3. I already said that I'm trying to convert my strategies from eSignal. There I could in back testing execute an order on a current bar. In NT I can't. The closest to it is an advance limit order.

      What I'm trying to do is enter a position if price touches an EMA. So I issue a limit order at the current EMA level. If next bar goes to that price I want to enter.

      Regards,
      Baruch
      Attached Files

      Comment


        #4
        1. How are you discerning a buy limit was filled? Please check your NT Control Center logs to see what happened.

        2. This is precisely the case that can happen in reallife. Of course if it did happen in real life you would be the one moving the bar to encompass your trade, but since this is simulation it does not modify the bar data.

        3. You cannot trade on the signal bar. Reason for this is because the snapshot in time you have for that bar is the close of the bar. You have the closing price of the bar and to have this it means there is no longer any tradeable location in that bar. The next tradeable slot is the open of the next bar.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          1. Attached are trades and orders from back testing.
          2. I don't understand how a limit order can be filled outside a bar. What order should I issue then?
          3. I know that. My point is that in live trading I can enter in the middle of a bar. As a price touches the EMA I enter. If in back testing you would allow entering on the same bar it would be a much much better representation of a live trading, and a strategies would be much much more accurate.
          Attached Files

          Comment


            #6
            1. Looks to me as if you did submit a buy limit order. Please use TraceOrders = true to evaluate what order was truly sent.

            2. If you want it to fill inside the bar use a market order. Limit orders can fill outside of the bar in real life due to inside market actions and things like that.

            3. We do not allow this since NinjaTrader does not allow for peaking into the future. Having the bar close and then trading sometime inside the closed bar is the same thing as knowing what happened in the future and placing a trade into the past. In real life it is not as simple as placing a trade the moment it crosses. As a bar is building, the EMA can cross back and forth numerous times as the price action moves up and down.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            558 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            324 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            545 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            547 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X