• 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

How to manage loading multiple dataseries added using AddDataSeries

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

    How to manage loading multiple dataseries added using AddDataSeries

    Hi,
    I'm loading a several data series using AddDataSeries in my indicator. I want to also load a larger timeseries of the primary dataseries I have on the chart.
    So for example say I have 5 days of 1 minute data on the chart, I want to be able to load a larger set of 5000 bars in the indicator for analysis behind the scenes.
    1) Will this work?
    2) How can I check which Bars object this is in the BarsArray?
    Thanks,
    iq

    #2
    You may the the below link instructive:
    NT8 - Multi-Time Frame & Instruments

    Comment


      #3
      Hello,

      Thank you for the post.

      Yes the Multi-TimeFrame page previously linked is a good place to start learning about these concepts.

      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.

      To check that data you would use the standard ways to check a secondary series price such as Closes[1][0]. There are further examples in the page linked in post #2.

      Please let me know if I may be of additional assistance.
      JesseNinjaTrader Customer Service

      Comment


        #4
        Hi Shansen/Jesse, Thank-you both for your answers.
        If I load all the data into the primary dataset, is there an example to show how I can only plot the analysis techniques on the chart on part of the most recent data ? I only need to plot the indicators I have on the chart for a couple of days but need to perform analysis on the longer data for many days back.
        Thanks,
        iq

        Comment


          #5
          Hello,

          Thank you for the reply.

          I wouldn't know of a specific sample that shows what you are asking, this would likely be something you need to handle with logic in the script. Depending on your condition to know when it should plot, you would just start plotting from that point. Most indicators by default are also set to a Maximum lookback of 256 bars so this should prevent some data from being used to start with. To avoid calculating until a certain point, the script that will be plotting would need to delegate that in its logic to know to avoid to plot for a period of time. if you are referring to manually added indicators, there would be no way to affect those as they will use the series they are applied to.

          Please let me know if I may be of further assistance.
          JesseNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Erwin Beckers, Today, 01:23 AM
          0 responses
          2 views
          0 likes
          Last Post Erwin Beckers  
          Started by Mark Taylor, Yesterday, 11:36 PM
          0 responses
          3 views
          0 likes
          Last Post Mark Taylor  
          Started by Bluebeep, Yesterday, 08:38 PM
          0 responses
          7 views
          0 likes
          Last Post Bluebeep  
          Started by stokhastic, Yesterday, 07:08 PM
          0 responses
          3 views
          0 likes
          Last Post stokhastic  
          Started by jlkramer16, Yesterday, 04:29 PM
          1 response
          4 views
          0 likes
          Last Post jlkramer16  
          Working...
          X