Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

AddDataSeries RTH to ETH Chart

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

    AddDataSeries RTH to ETH Chart

    For ES using different Sessions and different chart types.

    I am trying to add data series ES RTH BarsPeriodType.Minute, Period 450 to an ES ETH Tick chart.

    The following from the Help Guide does not have the option for Period Type, Period Interval and Session Type.

    The following syntax allows you to add another Bars object for a different instrument to the script:
    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)

    What is the solution? Thanks.

    #2
    Hello TAJTrades,

    You would need to use the any of the overload sets that include tradingHoursName. For AddDataSeries overloads that take a BarsPeriod you need to create a BarsPeriod like the help guide shows.



    Code:
    AddDataSeries("AAPL", new BarsPeriod { BarsPeriodType = BarsPeriodType.Minute, Value = 1440 }, "US Equities RTH");
    Keep in mind that adding an RTH hour series to a chart of the same instrument will make OnBarUpdate get called for bars that are during both sessions and not outside of those sessions.

    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.
    https://ninjatrader.com/support/help...ghtsub=adddata

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    646 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    367 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    108 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    570 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    573 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X