Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi Time Frame Fills

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

    Multi Time Frame Fills

    I am running a multi time frame strategy that issues orders when BarsInProgress=1. For example...

    Code:
    if (BarsInProgress==1)
    {
        if (mycondition)
            EnterShort(0,DefaultQuantity,"SE");
    }
    The attached screen shot shows my order being filled at 9:47 AM. However, my conditions are met at 9:45 AM, and my logs show that I am indeed sending the order at 9:45 AM. Why would the order wait 2 bars to fill?
    Attached Files

    #2
    toptrader,

    Please provide the TraceOrders = true logs and log tab information so we can analyze this particular scenario. Thank you.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Below is my TraceOrders log. I don't show anything in the Logs tab.

      3/25/2010 6:24:00 AM Entered internal PlaceOrder() method at 3/25/2010 6:24:00 AM: Action=Buy OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='LE' FromEntrySignal=''

      3/25/2010 6:31:00 AM Entered internal PlaceOrder() method at 3/25/2010 6:31:00 AM: Action=Sell OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='LX' FromEntrySignal='LE'

      3/25/2010 8:19:00 AM Entered internal PlaceOrder() method at 3/25/2010 8:19:00 AM: Action=Buy OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='LE' FromEntrySignal=''

      3/25/2010 8:24:00 AM Entered internal PlaceOrder() method at 3/25/2010 8:24:00 AM: Action=Sell OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='LX' FromEntrySignal='LE'

      3/25/2010 9:45:00 AM Entered internal PlaceOrder() method at 3/25/2010 9:45:00 AM: Action=SellShort OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='SE' FromEntrySignal=''

      3/25/2010 9:48:00 AM Entered internal PlaceOrder() method at 3/25/2010 9:48:00 AM: Action=BuyToCover OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='SX' FromEntrySignal='SE'

      3/25/2010 10:41:00 AM Entered internal PlaceOrder() method at 3/25/2010 10:41:00 AM: Action=SellShort OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='SE' FromEntrySignal=''

      Comment


        #4
        toptrader,

        Then you would be backtesting? That would explain why you don't see orders in the Log tab. In that case, you will then need to evaluate the orders themself through additional Print()s you add to OnOrderUpdate() to get the tracking needed to understand the behavior.

        Please note that when you submit an order to a different BIP context it actually submits that order when the next BIP arrives and since you are backtesting the order gets filled on the following BIP event for the correct BIP context after that. If you are on 1 min chart the 2min would be the correct sequence.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          I have used additional print commands to debug. The print commands and traceorders logs show that the code is behaving as expected. The order is being sent at 9:45 AM, when BarsInProgress=1. I understand that since I am sending the order on BIP=1, I will have to wait for the next bar when BIP=0. But the next bar would be 9:46. Instead, the order is filling at 9:47.

          The same thing happens on my exits. All logs show that the exit is being sent at 9:48 when BIP=1. Here I would expect the order to fill on the open of the 9:49 bar, when BIP=0. Instead, my order is filled on the close of the 9:50 bar. Every order is filled 2 bars late.

          Comment


            #6
            toptrader, which timeframes / bars objects do you use in this strategy. Please note Josh's comment below explaining the extra bar needed to submit in proper sequence if you're submitting to another BIP for execution.

            Comment


              #7
              I am using 1 min bars for both.

              Comment


                #8
                Thanks, then this would be expected as you wait for the other instruments 1 min update until you can place the order for the following bar then, this introduces the sequence you saw.

                Comment


                  #9
                  So if I understand correctly, I am sending the order at 9:45 when BIP=1. The next bar at 9:46 recognizes the order when BIP=0, and sends it. Since this order is sent on the 9:46 bar, it is filled on the 9:47 open.

                  Is there a way to get the order to fill at 9:46? Will I see the same behavior when running live?

                  Comment


                    #10
                    In realtime it would fill as soon as placed provided it's a market order, for backtesting you could add a lower series still to execute to - http://www.ninjatrader-support2.com/...ead.php?t=6652

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    581 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    336 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    103 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    554 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    552 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X