Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Load X Bars at secondary data series

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

    Load X Bars at secondary data series

    Hi fellow traders I would like to load X bars of a secondary data series when the strategy is enabled. Is there any possibility the do that?

    thanks

    #2
    Hello Lopat,

    Thank you for your inquiry.

    There is an overload for AddDataSeries() that takes an argument for barsToLoad.

    AddDataSeries(string instrumentName, BarsPeriod barsPeriod, int barsToLoad, string tradingHoursName, bool? isResetOnNewTradingDay)

    Please note that in the case of an additional series for the same instrument and bar type that already has been added to the script:

    "When adding multiple Data Series of the same instrument and the same Bar Type, the 'barsToLoad' property will only be effective on the first added series. Subsequent series with a different barsToLoad setting will not load a different number of bars than the first series."

    AddDataSeries(): https://ninjatrader.com/support/help...dataseries.htm

    If you have any other questions, please let me know.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    87 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    132 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    118 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X