Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Limiting time-frame of an added bars object

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

    Limiting time-frame of an added bars object

    I've added a 1 tick bars object to an indicator whose base:
    Add(Instrument.FullName, PeriodType.Tick, 1, MarketDataType.Last);

    I would like to be able to limit the number of tick bars (i.e., I do not need the tick data to span the entire chart date range as the base data series.

    How can I accomplish this?

    Mike

    #2
    Unfortunately you cannot limit the number of tick bars. It will try to match dates with whatever you have for your primary series.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Well, that is ]unfortunate. Wish you could pass this request along for an enhancement request to consider. Would greatly improve performance for what I'm doing.
      Thanks.

      Comment


        #4
        miker,

        You cannot limit the number of bars because the architecture of how indicators and scripts are processed would not allow it to. It does not make sense to have asymmetrical series and would actually cause problems if code processing was allowed when not all series had bars.

        If series A had 100 days of data, series B only had 50 days, and the code logic was to check something from series B, on day 80 series B doesn't even exist and the code would run into errors.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          I understand.
          Thanks Josh.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          574 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          332 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
          553 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X