Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bars skipped in multi time frame strategy

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

    Bars skipped in multi time frame strategy

    Hello,
    to simplify the question i will drop all unnecessary details.
    If I run a strategy (maximum bars look back = Infinite) on 1 main time frame for "ES 06-15" 1 day instrument, and I use CalculateOnBarClose = false, I get the OnBarUpdate() method called 91 times,
    from:
    DateTime: 10/02/2015 22:15:00,
    BarsInProgress: 0,
    CurrentBar: 1,

    until:
    DateTime: 18/06/2015 22:15:00,
    BarsInProgress: 0,
    CurrentBar: 91,

    all together 91 bars, 91 times. all good.
    but if I add another time period -
    Add(PeriodType.Minute, 300); // (or any other amount of minutes)
    suddenly I get the first 80 bars on the main instrument ignored -
    from:
    DateTime: 03/06/2015 22:15:00,
    BarsInProgress: 0,
    CurrentBar: 80,

    until:
    DateTime: 18/06/2015 22:15:00,
    BarsInProgress: 0,
    CurrentBar: 91,

    now my question is, why because i added another time frame, i lost the OnBarUpdate() being called on the first 79 bars of the main instrument?

    thank you

    #2
    This problem cries out for some example code.

    Do you have a toy strategy that you can attach?

    Comment


      #3
      Hello,
      I have not been able to reproduce this scenario on my end.
      Would you be able to attach a sample strategy that reproduces what you are seeing on your end?
      I look forward to your reply.
      Cody B.NinjaTrader Customer Service

      Comment


        #4
        there's really nothing to the code more than ive described

        like i said, the main bars object is set on a chart of ES 06-15 daily



        protected override void Initialize()
        {
        CalculateOnBarClose = false;
        BarsRequired = 1;
        Add(PeriodType.Minute, 300);
        }

        /// <summary>
        /// Called on each bar update event (incoming tick)
        /// </summary>
        protected override void OnBarUpdate()
        {
        Print(string.Format(@"
        DateTime: {0},
        BarsInProgress: {1},
        CurrentBar: {2},",
        Time,
        BarsInProgress,
        CurrentBar));
        }

        Comment


          #5
          Thanks for the code example.

          Just to be clear, is this NT7 or NT8?

          Comment


            #6
            NT7, simulated data feed

            Comment


              #7
              Originally posted by dadomil View Post
              NT7, simulated data feed
              Ah, I see. Well, as they say on the TV show 'Shark Tank' -- I'm out.

              [Why? My interest plummeted to zero because, IMHO, simulated data feed isn't worthy of the expectation of the level of performance you're looking for. I mean, I know what you're asking, sure, but if this was happening in market replay, or realtime or historical data during backtest, I'd be deeply scared something was really wrong. But with simulated data feed, there is no red flag, IMHO, just a very light pink flag, so my concern has dropped to zero. Phew. I can now relax and watch the Super Bowl. The NT support guys can decipher the true importance of this issue and help you much better than I can. Good luck.]

              Comment


                #8
                Hello,
                Do you have historical minute data saved on your PC for the number of days you are loading on your chart? This can be found in the Historical Data Manager under the Edit Tab. For more information on using the Historical Data Manager please see the following link: http://ninjatrader.com/support/helpG...t7/editing.htm
                Cody B.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