Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi Time Frame Bug

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

    Multi Time Frame Bug

    Hi,
    I use 5min primary bars and 10min as a second array.
    I issue an order on 10min at 12:40 and I see in debugger that it was executed at that time, but on chart in back testing I see it on open of a 12:50 bar. Why not 12:45???

    Baruch

    #2
    Baruch, because you submitted the order to the 10 min chart, not for the more granular one to execute intrabar. Please work alongside this reference sample to achieve this - http://www.ninjatrader-support2.com/...ead.php?t=6652

    Comment


      #3
      Bertrand thanks.
      The example you referenced is not what I need, because in the strategy it says that the second bar array should be smaller than the first.
      In help file the explanation on multi time frame is also not complete.
      In it is shown that on the 5'th 1 minute bar you see only 1'st 3 minute bar. I understand that but shouldn't it be that on six 1 minute bar I can see the second 3 minute bar?
      More specifically to my question at 12:40 on 5 minute bar can I see what happened at 12:40 on 10 minute chart?
      If I could see it then if I want to exit my position if something happened at 12:40 on 10 minute chart I should see the exit on open of 12:45.

      Baruch

      Comment


        #4
        Baruch, please work according to the reference sample given and change the order in which you access your bars objects. For the helpguide explanation - in realtime this will depend on your CalculateOnBarClose setting. With this to false, you will have access to the 'forming' bar of the higher timeframe as you indicate. In backtesting strategies will always be evaluated at the close of the bar, this is why you need to submit your orders to a finer datastream to simulate executing them intrabar.

        Comment


          #5
          Hi Bertrand,
          Can I get an explanation from you because all the examples are not what I need. My question is: If I run a strategy on 5 min bars, and I add second interval of 10 min. In OnBarUpdate I put if (BarsInProgress > 0) return.
          When the strategy runs on 12:40 bar, can I ask about indicator value of 12:40 10min bar???
          I have CalculateOnBarClose = true, so your answer should be for back testing and real time.

          Baruch

          p.s.
          I run the strategy on 5 min because thats the time frame that I want. I add 10 min only for one type of exit. (One of many)

          Comment


            #6
            Baruch, the proper sequence of bars object used is very important, so I suggest to work alongside the reference sample. To your question: Yes you can access the indicator value of the longer timeframe, but only with CalculateOnBarClose set to false, otherwise since this bar is still developing as your try accessing the value it would give you the indicator value of the last OnBarUpdate() call for this series. It might be helpful to Print the OnBarUpdate() calls to the output window to see in which sequence each is called in your context.

            Comment


              #7
              Hi Bertrand,

              I cannot compile the sample multi time frame strategy, because it gives me an error.

              In general how can I use two time frames in an indicator?

              THX: Kalman

              Comment


                #8
                kalman,

                What is the error you receive on compile?

                Multi-time frame indicators will be supported in NT7.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Originally posted by NinjaTrader_Josh View Post
                  kalman,

                  What is the error you receive on compile?

                  Multi-time frame indicators will be supported in NT7.
                  Hi,

                  mistake, the strategy compiles well, but indicator does not.

                  When will be the 7.0 available?

                  THX K.

                  Comment


                    #10
                    Great kalman, we target end of September for the start of public beta at this time, more info and development status updates can be found under this link - http://www.ninjatrader.com/webnew/NT7/NinjaTrader7.html

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    646 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    367 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by Mindset, 02-09-2026, 11:44 AM
                    0 responses
                    107 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                    0 responses
                    569 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    573 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X