Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    Gaby V.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by reynoldsn, Yesterday, 07:11 PM
    2 responses
    12 views
    0 likes
    Last Post reynoldsn  
    Started by manueldecastro, Today, 10:26 AM
    2 responses
    11 views
    0 likes
    Last Post manueldecastro  
    Started by i2ogu3, Yesterday, 11:31 PM
    3 responses
    22 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by cmtjoancolmenero, 04-29-2024, 03:40 PM
    23 responses
    70 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by reynoldsn, Yesterday, 04:40 PM
    3 responses
    14 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X