Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Second Time Series

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

    Second Time Series

    Morning,

    I am running a Strategy file on a small granularity bar size. Say 200 ticks or 20 Renko etc for a bunch of futures.

    I'd like to be able to add a time series using

    AddDataSeries("XX ##-##", Data.BarsPeriodType.Day, 1);

    whose instrument is whatever instrument the chart is that I am applying the strategy to. Right now, I only know how to go in and hard code daily bars for NQ for a high freq NQ trade, daily bars for ES for a etc etc

    Is this possible?

    Thanks!




    #2
    Hello ozziyhtomit,

    Thanks for your post.

    If you want to add a data series of the same instrument as the chart, you need only provide barsperiodtype and size.

    from the help guide:

    Syntax
    The following syntax will add another Bars object for the primary instrument of the script.
    AddDataSeries(BarsPeriod barsPeriod)
    AddDataSeries(BarsPeriodType periodType, int period)


    Reference: https://ninjatrader.com/support/help...dataseries.htm

    So you just need AddDataSeries(BarsPeriodType.Day, 1);

    It is only when you want to add a different instrument that you would need to hard code the instrument name in the addDataSeries() method.

    Comment


      #3
      Awesome and thank you!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      37 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      124 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      64 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X