• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 motog4, Today, 11:42 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_PatrickG  
        Started by derivtrader, Today, 11:20 AM
        2 responses
        9 views
        0 likes
        Last Post derivtrader  
        Started by TAJTrades, Today, 10:34 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by timcjpfx, Today, 10:20 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Eloi_, Today, 09:48 AM
        2 responses
        10 views
        0 likes
        Last Post Eloi_
        by Eloi_
         
        Working...
        X