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
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by wobmon, Today, 11:56 AM
    8 responses
    31 views
    0 likes
    Last Post rockmanx00  
    Started by defa0009, 12-13-2024, 09:19 AM
    22 responses
    237 views
    1 like
    Last Post defa0009  
    Started by Parmenides48, Today, 06:03 PM
    0 responses
    5 views
    0 likes
    Last Post Parmenides48  
    Started by sclay115, 02-10-2025, 03:58 PM
    5 responses
    24 views
    0 likes
    Last Post rockmanx00  
    Started by sclay115, Today, 02:14 PM
    1 response
    11 views
    0 likes
    Last Post rockmanx00  
    Working...
    X