Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Additonal data series: Daily -AND- RTH bars?

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

    Additonal data series: Daily -AND- RTH bars?

    The examples from the documentation:

    Code:
    AddDataSeries(string instrumentName, BarsPeriodType periodType, int period)
    AddDataSeries(string instrumentName, BarsPeriodType periodType, int period, MarketDataType marketDataType)
    AddDataSeries(string instrumentName, BarsPeriod barsPeriod)
    AddDataSeries(string instrumentName, BarsPeriod barsPeriod, string tradingHoursName)
    AddDataSeries(string instrumentName, BarsPeriod barsPeriod, string tradingHoursName, bool? isResetOnNewTradingDay)
    AddDataSeries(string instrumentName, BarsPeriod barsPeriod, int barsToLoad, string tradingHoursName, bool? isResetOnNewTradingDay)​
    None of these seem to allow for this, but I'm sure I'm missing something.

    Can anyone reading this please help out? I've spent a lot more time on this than I care to admit.

    I'm trying to add a daily RTH data series to my primary strategy that already has a couple of additional data series. This would be BarsArray[3] if I could get it up and running. I've tried 1440m and a few other things but I wanted to ask for help before I waste any more precious Sunday time.

    #2
    Hello WalterSkinner,

    Day bars cannot have trading hours template applied. These come fully formed from the data provider.

    If you want to specify a trading hours template use minute bars (like 1440 minute to represent 1 day).

    The overloads with the tradingHoursName would be the name of the template you want to apply.
    AddDataSeries(string instrumentName, BarsPeriod barsPeriod, string tradingHoursName)

    For example if the instrument was the ES 03-23, the RTH template for this would be 'CME US Index Futures RTH'.

    AddDataSeries(null, new BarsPeriod() { BarsPeriodType = BarsPeriodType.Minute, Value = 1440 }, "CME US Index Futures RTH");

    Note from the help guide:
    "If your NinjaScript object is using AddDataSeries() allowing to specify a tradingHoursName, please keep in mind that: An indicator / strategy with multiple DataSeries of the same instrument will only process realtime OnBarUpdate() calls when a tick occurs in session of the trading hour template of all added series. Any ticks not processed will be queued and processed as a tick comes in for all subsequent DataSeries."


    This warning is letting you know, data will only be processed when all series are in session (and will be queued until then).
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    592 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    343 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
    556 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    554 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X