• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AddDataSeries with less Days to Load

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

    AddDataSeries with less Days to Load

    I am trying to load 6 dataseries 5M 30M 60M 1D 1W 1Month on each others charts. I have a lot of charts open so I keep my Bars to Load to 100 usually unless its a big pattern layout. This works for any time frame for a fairly small chart. However, I get the error:
    Error on calling 'OnBarUpdate' method on bar 0: You are accessing an index with a value that is invalid since it is out-of-range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.
    Because in order for me to use the 1 Month dataseries, I would need 219,000 5 minute candles to be able to use a 1 Month data series. I do not know NT well so I thought perhaps someone had a trick to be able to use a long term dataseries without having to load many candles to keep it light. See image for visual.

    Thanks for any help!
    Last edited by UncleRyan; 05-27-2020, 08:21 PM.

    #2
    Hello UncleRyan,

    Thank you for your post.

    There is an overload that allows you to specify the number of bars to load for additional data series; however, this may only be used if the secondary series is a different instrument and bar type from the primary.

    We have further documentation on the AddDataSeries command here: https://ninjatrader.com/support/help...dataseries.htm

    Using the overload with BarsToLoad would allow you to specify the number of BarsToLoad but that is assuming that the second series is not the same as the primary series in respect to using the same instrument and the same Bar Type. To answer your question, if the secondary is the same instrument and bar type, you would need to just load that many bars on the primary series to achieve that goal. If the second series is not the same, you can specify a BarsToLoad in the overloads.

    So, no, in your case, you would need the strategy to load all the bars for each series.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Kate,

      Thanks for the clear information. That is very disappointing.

      Comment


        #4
        Since you were so knowledgeable I thought I'd see if this sounded possible: I know you can create your own bar types in NT - though I have never done it. Could you create a "new" bar type, but just make it candles like the primary series, but it would be an alias so to speak. Would that "trick" it into thinking its a different candle type so I could do the overload? Just a thought. Thank you for your explanations, I'm learning quite a bit.

        Comment


          #5
          Hello UncleRyan,

          Thank you for your reply.

          I'm actually not certain on that. I will do some testing and get back to you.

          Thanks in advance; I look forward to assisting you further.
          Kate W.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by darkgreen, Today, 11:53 AM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_ChristopherD  
          Started by trader510, Today, 11:44 AM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_Heath  
          Started by Lumbeezl, Yesterday, 06:32 PM
          4 responses
          25 views
          0 likes
          Last Post MojoJojo  
          Started by ozziyhtomit, Yesterday, 05:24 PM
          1 response
          12 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Started by habibalex, Today, 09:45 AM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_Tabor  
          Working...
          X