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

Using data multiple instrumenst

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

    Using data multiple instrumenst

    I have a strategy using all symbols of the Nasdaq 100 by adding them to the strategy in the Initialize section. I also use data from symbols that have been delisted from the stock exchange. This gives the following issue: I have three symbols A, B and C. In NT stock A has data from June 2014-today, Stock B data from Jan 2000-today and stock C data from Jan 2000-Jan 2005 (because it was delisted from the stock exchange in jan 2005). If I run the strategy the Initialize and OnStartup section are executed but not the OnBarUpdate section. If I run the strategy with only stock A and stock included the strategy runs fine, If I run the strategy with only stock B and stock C included the strategy is also running fine. I figured out that is due to the fact that stock A and C have no overlap data. If I now add zero (0) values for stock A from the period Jan 2000 untill May 2014, the strategy s runing fine. Is anyone familiair with this issue and is there a way to overcom this without have to add 0 values?

    #2
    Hello Renejm,

    Thanks for opening the thread.

    There will need to be data for all of the added data series for OnBarUpdate() to iterate properly.

    Adding zero values for the data on that instrument is a valid workaround to get the strategy to run when there is missing data. There is not another approach I could recommend for an alternate workaround.

    If there is anything else I can do to assist, please let me know.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Waxavi, Today, 02:10 AM
    1 response
    17 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by Kaledus, Today, 01:29 PM
    5 responses
    13 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by Waxavi, Today, 02:00 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by alifarahani, Today, 09:40 AM
    5 responses
    23 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by gentlebenthebear, Today, 01:30 AM
    3 responses
    17 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X