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 CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      58 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      34 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      196 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      362 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      281 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X