Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OutOfMemoryException in Strategy Analyzer

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

    OutOfMemoryException in Strategy Analyzer

    NT8 throws System.OutOfMemoryExceptions when running SampleMACrossover in Strategy Analyzer. I am running it on the nine instruments in <FOREX> for ten years. It should be running from Historical data, but is also connected to FXCM. It can finish one instrument at a time. It can finish the nine instruments if I request only a year or two. It can optimize, but fewer instruments or years than without optimization.

    Ever since I started using NT8, it runs fine on small jobs that take only a few minutes, but tends to crash after it has run for 5-10 minutes. Windows Task Manager generally shows NinjaTrader using 1.2-1.4 GB of RAM while there is usually 2-6 GB of RAM free (total of 12 GB). It does not seem to matter whether I have been running a lot of applications or whether I have done a restart and run NinjaTrader only.

    Following is an example:

    Problem signature:
    Problem Event Name: CLR20r3
    Problem Signature 01: NinjaTrader.exe
    Problem Signature 02: 8.0.0.8
    Problem Signature 03: 568bf871
    Problem Signature 04: mscorlib
    Problem Signature 05: 4.6.1055.0
    Problem Signature 06: 563c0eac
    Problem Signature 07: 12bc
    Problem Signature 08: 0
    Problem Signature 09: System.OutOfMemoryException
    OS Version: 6.1.7601.2.1.0.256.1
    Locale ID: 1033
    Additional Information 1: 0a9e
    Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
    Additional Information 3: 0a9e
    Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

    The System.OutOfMemoryException is sometimes thrown by NinjaTrader.core instead of mscorlib. Occasionally, System.NullReferenceException is thrown first:

    Problem signature:
    Problem Event Name: CLR20r3
    Problem Signature 01: NinjaTrader.exe
    Problem Signature 02: 8.0.0.8
    Problem Signature 03: 568bf871
    Problem Signature 04: NinjaTrader.Core
    Problem Signature 05: 8.0.0.8
    Problem Signature 06: 568bf86e
    Problem Signature 07: fe1
    Problem Signature 08: 37c
    Problem Signature 09: System.NullReferenceException
    OS Version: 6.1.7601.2.1.0.256.1
    Locale ID: 1033
    Additional Information 1: 0a9e
    Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
    Additional Information 3: 0a9e
    Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

    In debug mode, System.OutOfMemoryException was thrown by the last (“else”) call to AddBar() in MinuteBarsType.OnDataPoint(), although the debugger showed bars.Count == 0, so that branch should not have executed (see first attachment).

    Running the same job again in debug mode, System.OutOfMemoryException was thrown by the call to EnterLong() in SampleMACrossover.OnBarUpdate(), although the debugger showed this.Bars and this.Instrument were both null (see first attachment), even though the job had been running for several minutes. I don’t understand how OnBarUpdate() could be called if this.Bars is null.

    Please let me know if you need more information.

    NT8 has nice feature improvements, but I can’t trade with it until it becomes more stable.
    Attached Files
    Last edited by rmt81; 02-02-2016, 01:01 PM. Reason: add paragraph marks

    #2
    Hi,

    Can you clarify if you're using the 32-bit or 64-bit version of NinjaTrader?

    I'd expect these results, using 1.2GB of memory as those are the limitations of using that exe.

    Using 64-bit version should allow NT8 to use as much memory as you have installed.

    Can you double check you are starting the 64-bit icon, and run your test again? Please do let us know if you receive out of memory exceptions using that version.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Thank You

      Yes, I was using the 32-bit version. I'll try the 64-bit version.

      Is there an easy way to tell? I thought most programs put it in the About screen of the Help menu.

      I had been launching from a shortcut on my task bar and could not figure out where that pointed. I finally figured it out from looking at the Task Manager.

      Thanks again for your quick reply.

      Comment


        #4
        Originally posted by rmt81 View Post
        Yes, I was using the 32-bit version. I'll try the 64-bit version.

        Is there an easy way to tell? I thought most programs put it in the About screen of the Help menu.

        I had been launching from a shortcut on my task bar and could not figure out where that pointed. I finally figured it out from looking at the Task Manager.

        Thanks again for your quick reply.
        The 64-bit should be as per the attached, however the 32-bit does not make any indication.

        Click image for larger version

Name:	64-bit.PNG
Views:	1
Size:	20.6 KB
ID:	877456

        The start icons either on your desktop or start menu should work the same way, with the 64-bit version indicating the difference


        Click image for larger version

Name:	start_menu.png
Views:	1
Size:	8.6 KB
ID:	877457
        MatthewNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by PhillT, Today, 02:16 PM
        2 responses
        3 views
        0 likes
        Last Post PhillT
        by PhillT
         
        Started by Kaledus, Today, 01:29 PM
        3 responses
        9 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by frankthearm, Yesterday, 09:08 AM
        14 responses
        47 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by gentlebenthebear, Today, 01:30 AM
        2 responses
        13 views
        0 likes
        Last Post gentlebenthebear  
        Started by PaulMohn, Today, 12:36 PM
        2 responses
        17 views
        0 likes
        Last Post PaulMohn  
        Working...
        X