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

OutOfMemoryExeption for Strategy Analyzer?

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

    OutOfMemoryExeption for Strategy Analyzer?

    Dear Support,

    I need your advise.
    Is there any limitation in memory or time when you run a strategy analyzer?

    I'm running this long strategy which texts all the indicators in 5 min bars, but every time I run, the strategy is disabled during the run.

    The log states as follows;

    Error on calling OnBarUpdate for strategy Strategy xxx System.OutOfMemoryExemption


    Could you please advise me if there's any way to avoid this?


    Thank you.

    #2
    This will vary per system.

    Are you running the 32-bit or 64-bit version of NinjaTrader?

    How much memory is on your machine? How much is being used at the time of the error?
    MatthewNinjaTrader Product Management

    Comment


      #3
      Originally posted by hana_maui View Post
      Dear Support,

      I need your advise.
      Is there any limitation in memory or time when you run a strategy analyzer?

      I'm running this long strategy which texts all the indicators in 5 min bars, but every time I run, the strategy is disabled during the run.

      The log states as follows;

      Error on calling OnBarUpdate for strategy Strategy xxx System.OutOfMemoryExemption


      Could you please advise me if there's any way to avoid this?


      Thank you.
      Sounds more like a memory leak in the code.

      Comment


        #4
        Memory Problems when -> Print Commands in strategy run by Analyzer

        Originally posted by hana_maui View Post
        Dear Support,

        I need your advise.
        Is there any limitation in memory or time when you run a strategy analyzer?

        I'm running this long strategy which texts all the indicators in 5 min bars, but every time I run, the strategy is disabled during the run.

        The log states as follows;

        Error on calling OnBarUpdate for strategy Strategy xxx System.OutOfMemoryExemption


        Could you please advise me if there's any way to avoid this?


        Thank you.
        I have had a "memory problem" when running Strategy analyzer when my strategy has "Print" commands in it. When it happens for me I do not get a nice message, it just sucks up all the CPU cycles and hangs Ninjatrader, and I must reboot Windows to reset the condition. When I examine the memory resources as the program runs.. it takes more and more memory (and cycles).. until I have to reboot.

        Do you have any "Print" (to the output window) commands in your code?

        Comment


          #5
          Thanks for the reply.
          I used 32bit system with 2gb memory.
          NT used around 1.6gb before shutting down.

          The code is rather simple.
          I'm just texting the indicators by modifying the ExportData ea posted on this forum.

          Will it cause problem writing too many lines?
          I'm trying to export 19 x 20 indicator values on a 5 min chart for recent 4 years.

          Will this consume too much memory?
          Is there any way to avoid consumption of memory?

          Would appreciate your advise.

          Comment


            #6
            Hello,

            On a 32-bit system, a .NET process such as NinjaTrader will be capped at around 1.5GB~

            You may want to just reduce the number of indicators you're outputting at a time to reduce the amount of memory that's being used.

            If this only occurs after a few runs with the strategy analyzer, you may force the system to release some of these objects in memory by closing out of the strategy analyzer and opening a new instance of the strategy between each run.
            MatthewNinjaTrader Product Management

            Comment


              #7
              Thanks for the feedback.

              I then used 64bit machine with 8Gb memory, this time it's not shutting down but seems like the calculation is taking too much time after the NT memory consumes around 6.6Gb.

              I think I will just have to append 1 month after another.

              Thank you for your advise.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by ETFVoyageur, Today, 12:52 AM
              0 responses
              4 views
              0 likes
              Last Post ETFVoyageur  
              Started by Board game geek, Yesterday, 02:20 AM
              2 responses
              21 views
              0 likes
              Last Post Board game geek  
              Started by jackiegils, Yesterday, 11:05 PM
              0 responses
              5 views
              0 likes
              Last Post jackiegils  
              Started by cre8able, 05-09-2024, 09:15 PM
              2 responses
              17 views
              0 likes
              Last Post cre8able  
              Started by Trader146, Yesterday, 09:17 PM
              0 responses
              10 views
              0 likes
              Last Post Trader146  
              Working...
              X