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

Performance Optimization - loading multiple instances of an indicator

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

    Performance Optimization - loading multiple instances of an indicator

    So I'm working on a system where I have multiple custom indicators, and they all call the Orderflow cumulative delta. Since OFCD is tickbased it takes a while to load. My question is, it seems the same data is loaded multiple time, once for the UI indicator, and also once per indicator that is using it in the code - so is there a way to optimize this so that it's only loaded once?

    #2
    Hello Magzor,

    Indicators are only cached/optimized in NinjaScript when they use identical settings/data. For example if you called an SMA twice using the same parameters and data the second SMA would be the first cached instance. Only in that case would there be any kind of cache or optimization. If you use different settings or data for the indicators they all will need to load and process individually. The manually applied chart indicators are not part of your NinjaScript so those will additionally need to load on their own.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks for the reply Jessy! Very helpful. Since I'm using the same settings for all my indicators when they load the Orderflow indicators, I assume it's only loading once which is perfect. (not counting the ui instance like you mentioned)

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by AaronKoRn, Yesterday, 09:49 PM
      0 responses
      11 views
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Yesterday, 08:42 PM
      0 responses
      10 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Yesterday, 07:51 PM
      0 responses
      11 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,981 views
      3 likes
      Last Post jhudas88  
      Started by rbeckmann05, Yesterday, 06:48 PM
      0 responses
      9 views
      0 likes
      Last Post rbeckmann05  
      Working...
      X