Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-Time Frame Order Delay

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

    Multi-Time Frame Order Delay

    I'm using a strategy that has multi time frames of the same instrument. CalculateOnBarClose = true, the primary time fame is the smaller, i.e. 1min. the secondary time frame is larger i.e 60min. I'm evaluating an indicator in the secondary time frame and entering the trade on the primary time frame. My problem is that when a bar in the secondary time frame evaluates true and I EnterLong() the order executes one bar late in primary time frame.

    For example, if in the 60 min time frame in the 8:00 bar i EnterLong() the order executes at the opening price of the 8:02 bar. I'd like to have the order execute at the open of the 8:01 bar.

    #2
    darckeen,

    You will need to swap your bars to have primary as the larger time frame series.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Ok, I think I understand why the primary bar needs to be bigger. Another question, is it possible to create a strategy that trades multiple instruments?

      Comment


        #4
        darckee, yes this is possible as you can direct the order execution to different bars objects / instruments - http://www.ninjatrader-support.com/H...struments.html

        Comment


          #5
          Ok i've got a multi instrument strategy working and was wondering if there is anyway to visualize the trades for individual instuments other then the primary instrument in the strategy analyser chart pane.

          Comment


            #6
            darckeen, it would probably be easiest to print 'Positions' to the output window for this - http://www.ninjatrader-support.com/H...Positions.html

            NinjaTrader 7 will offer a more detailed 'Strategies' tab for this - http://www.ninjatrader.com/webnew/NT7/NinjaTrader7.html

            Comment


              #7
              Thanks for the help so far. A few more questions:

              With a multi instrument strategy in backtesting the order of OnBarUpdate() always seems to go in the order that the instruments were Add() to the strategy. Will this hold true in live trading provided UpdateOnClose = true?

              Also is there anyway to implement SetStopLoss() and SetProfitTarget() in another BarsInProgress?

              Comment


                #8
                darckeen,

                When running a strategy live it doesn't matter what order you add them in. The events trigger in the order the data is received. If the primary is received first, then that will trigger first.

                Set() are not tied to specific BarsInProgresses. They just work off the data. If price touches or passes the Set() order then the order will try to fill.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Is it possible to access Performance by BarsInProgress or Instrument?

                  Comment


                    #10
                    Hi darckeen, I don't think there is a specific overload to access Performance by BIP or Instrument, but I can think of a workaround.

                    You can use Trade class to get trade information and then match the instrument provided in the IExecutions information for entry/exit.

                    Anyways, I'll leave this open so Josh takes a look at it on Monday to confirm.
                    AustinNinjaTrader Customer Service

                    Comment


                      #11
                      Unfortunately there is no filtering to the BarsInProgress or instrument level.
                      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
                      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