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

Medium-high data optimization

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

    Medium-high data optimization

    Hi, my Ninjatrader 8 is break when memory ram is consumed.

    It only happens in complicated optimizations (50,000 backtest for example) (all tick to tick). I understand that it is normal for it to happen. Now my question, if I buy more ram memory should increase the capacity of optimization? I have 16 Gb, if I place 64 GB should I support bigger optimizations?

    My processor is Intel core i7 8th generation, support no problem 64 gb.

    Example, if I stuck with 16 Gb ONLY in complicated cases (many combinations), to put 64 Gb means that at least it could have twice the capacity of optimization or the same will freeze Will it be changed to 64 GB?

    Greetings and thanks.
    Last edited by samir; 04-17-2019, 01:26 PM.

    #2
    Hello samir,
    Thanks for your post.

    Installing more RAM in your PC would really only be useful if you find yourself running out of memory(16GB would typically be plenty). Are you finding that you are running out of memory? Ultimately your PC will perform optimizations only as fast as its bottleneck, which could be your CPU, RAM, or hard drive. It would require some benchmark tests on your PC to see which resource your are ultimately running out of.

    The biggest performance gains during an optimization typically come from IsInstantiatedOnEachOptimizationIteration being set to false. It would also be important to ensure that objects are reused in memory instead of creating new ones and to minimize the number of loops used in the script as much as possible. (Storing a value that would normally be calculated the same again would give a performance boost)

    Please see the following link to our help guide document on IsInstantiatedOnEachOptimizationIteration: https://ninjatrader.com/support/help...niteration.htm

    Please let me know if you have any follow up questions
    Josh G.NinjaTrader Customer Service

    Comment


      #3

      Yes, this problem is memory (I believe), the program starts to stick and does not respond ONLY when it approaches the maximum of ram memory, as seen in the image. I use SSD disk (only the crash occurs when the ram memory is full), while the memory "does not fill up" the program responds, it can still be used although it is at 100% CPU. (graphics can be moved, etc.), but as it approaches the maximum memory it collapses. (remains unanswered and can not be used, you can not see the progress of the optimization since it does not respond).


      IT ONLY OCCURS in complicated optimizations, of many candles / data and many backtest. Nothing happens in common optimizations.
      Last edited by samir; 04-17-2019, 03:30 PM.

      Comment


        #4
        samir,

        My suggestion would be to run smaller optimizations(50,000 is quite large), but if you consistently find yourself running out of memory than perhaps you could use more. Another possibility(and more likely reason) for the high memory usage could be memory leaks caused by not properly releasing resources. Are you using any indicators or code in your strategy that utilizes drawing objects or other items that consume resources?
        Josh G.NinjaTrader Customer Service

        Comment


          #5
          I see that this topic is recurring, I have the same problem that has been described many times in the forum and the suggestions to solve it are useless. In my case, an optimization that freezes in nt8, when I run it in nt7 it works without problems without saturating the memory. It is clear that nt8 has a design problem and is not solved by adding more memory or running smaller optimizations. Is there any solution for this?

          Comment


            #6
            Hello gviand,

            May I confirm if your script is taking advantage of IsInstantiatedOnEachOptimizationIteration set to false resetting variables when possible and only re-initializing objects when absolutely possible?

            Below is a link to the help guide on this.

            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by aa731, Today, 02:54 AM
            0 responses
            4 views
            0 likes
            Last Post aa731
            by aa731
             
            Started by thanajo, 05-04-2021, 02:11 AM
            3 responses
            470 views
            0 likes
            Last Post tradingnasdaqprueba  
            Started by Christopher_R, Today, 12:29 AM
            0 responses
            10 views
            0 likes
            Last Post Christopher_R  
            Started by sidlercom80, 10-28-2023, 08:49 AM
            166 responses
            2,237 views
            0 likes
            Last Post sidlercom80  
            Started by thread, Yesterday, 11:58 PM
            0 responses
            5 views
            0 likes
            Last Post thread
            by thread
             
            Working...
            X