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 when using multiple DataSeries/Timeframes

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

    Performance when using multiple DataSeries/Timeframes

    I am interested in how the use of multiple Data Series in an indicator affects performance.

    Example: I have an indicator A that uses 12 different timeframes(Data Series). A second indicator B also uses these 12 different time frames.

    Is there a performance difference when I use both indicators in the same chart, or would it better to combine both indicators into one indicator so that the DataSeries being used are only being loaded once instead of twice? Or is there actually no difference?

    Would appreciate if you could give me a reference if this is covered already somewhere, or else explain it in simple terms as I am not a programming genius.

    sandman


    #2
    Hello sandman, thanks for writing in.

    Incoming data is cached in the NinjaTrader 7/db/cache folder. So when there are multiple requests to the same data, the following data requests are pulled from the cache to improve historical performance. In real-time data, it would be better for the two indicators to be combined because the data is processed in a linear manner (because NinjaTrader 7 is a single thread application, NinjaTrader 8 is multithreaded so it does not have this bottleneck).

    Please let me know if I can assist any further.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Interesting. Thank you, Chris.

      sandman

      Comment


        #4
        Hi Chris,

        I`d like to ask another question on the same subject.

        Please see attached image which shows two possibilities of arranging the additional time frames. Category A is unsystematic with the timeframes being added in a sporadic manner. In Category B, I arranged them from lowest to highest timeframe.

        Can you please say something whether B is better than A and why, or does it not actually matter as far as performance is concerned.

        sandman

        Attached Files

        Comment


          #5
          Hello sandman, thanks for your reply.

          Each will have the same impact on performance. Category A would be more of a hassle as far as organization and code readability goes. It's easier to sort the time frames from lowest to highest because it's just more organized that way, but there is nothing wrong with them being unorganized.

          Best regards,
          -ChrisL
          Chris L.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Barry Milan, Yesterday, 10:35 PM
          5 responses
          16 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by DanielSanMartin, Yesterday, 02:37 PM
          2 responses
          13 views
          0 likes
          Last Post DanielSanMartin  
          Started by DJ888, 04-16-2024, 06:09 PM
          4 responses
          12 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by terofs, Today, 04:18 PM
          0 responses
          11 views
          0 likes
          Last Post terofs
          by terofs
           
          Started by nandhumca, Today, 03:41 PM
          0 responses
          8 views
          0 likes
          Last Post nandhumca  
          Working...
          X