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, 03-31-2026, 09:41 PM
      1 response
      45 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      21 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      31 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      50 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Working...
      X