Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AddDataSeries Question

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

    AddDataSeries Question

    In Ninjatrader 7 I could use Add(BarsPeriod.Id ,BarsPeriod.Value*7); to add a DataSeries that the was the same BarType as the root but 7 times the Period Value.

    I Can't figure out how to read back the root Series Compression in NT8
    Is this even possible ? If so How do I do it ?

    Thanks

    #2
    Hello JerryWar,

    Thanks for opening the thread.

    This would constitute as a dynamically loaded Data Series and would not be possible in NinjaTrader 8. Since BarsPeriod and MasterInstrument get their values in State.DataLoaded, you would not be able to reference this value properly in State.Configure when we add additional data series.

    From the help guide:
    Warning:
    • This method should ONLY be called from the OnStateChange() method during State.Configure
    • Should your script be the host for other scripts that are creating indicators and series dependent resources in State.DataLoaded, please make sure that the host is doing the same AddDataSeries() calls as those hosted scripts would. For further reference, please also review the 2nd example below and the 'Adding additional Bars Objects to NinjaScript' section in Multi-Time Frame & Instruments
    • Arguments supplied to AddDataSeries() should be hardcoded and NOT dependent on run-time variables which cannot be reliably obtained during State.Configure (e.g., Instrument, Bars, or user input). Attempting to add a data series dynamically is NOT guaranteed and therefore should be avoided. Trying to load bars dynamically may result into an error similar to: Unable to load bars series. Your NinjaScript may be trying to use an additional data series dynamically in an unsupported manner.


    You may view the documentation for MasterInstrument and BarPeriod to reference the associated warnings.

    MasterInstrument - https://ninjatrader.com/support/help...instrument.htm

    BarsPeriod - https://ninjatrader.com/support/help...barsperiod.htm

    This is an item that we get a lot of feedback on and we are tracking with the Feature Request ID SFT-882. I will add a vote for this feature request on your behalf.

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

    Comment


      #3
      Thanks Jim,
      I suspected as much.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      599 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      344 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      103 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      558 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      557 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X