Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Loading Instruments via Add() is slow

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

    Loading Instruments via Add() is slow

    Hi,

    This is my first time posting in this forum so please bear with me. Also, I am a newbie at programming indicators in NinjaScript. In my Initialize() method I have the following lines of code:

    Code:
    // Add symbols			
    			Add("$EURUSD", PeriodType.Minute, timeFrameInMinutes); // index 1
    			Add("$GBPUSD", PeriodType.Minute, timeFrameInMinutes); // index 2
    			Add("$USDCHF", PeriodType.Minute, timeFrameInMinutes); // index 3
    			Add("$USDJPY", PeriodType.Minute, timeFrameInMinutes); // index 4
    			Add("$USDCAD", PeriodType.Minute, timeFrameInMinutes); // index 5
    			Add("$AUDUSD", PeriodType.Minute, timeFrameInMinutes); // index 6
    			Add("$NZDUSD", PeriodType.Minute, timeFrameInMinutes); // index 7
    The indicator is now running correctly however I am bothered by the fact that going through these lines takes NinjaTrader a long time to load. Is this normal for an indicator loading this much instruments via Add? Is there any alternative way to do this faster/more efficiently?

    Thanks!

    #2
    Welcome to our forums Karl - yes depending on how many days you load the primary series on your charts for this could take some loading time. Which data provider are you working with?

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Welcome to our forums Karl - yes depending on how many days you load the primary series on your charts for this could take some loading time. Which data provider are you working with?
      Thanks for replying Bertrand. I'm using Kinetick as my data provider. So one of the things that I can do to hasten load times is to decrease the number of days loaded? Can this be done in the indicator programmatically? Thanks!

      Comment


        #4
        You're welcome, ok. Correct, the less data it had to load overall, the quicker performance should be. It really depends how much you need for your analysis. Programmatically setting this would not be an option unfortunately, it would depend on what you set to use for primary series.

        Allowing more control here is on our feedback list for our next major update of the platform.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        597 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        343 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        556 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        555 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X