Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

"System.OutOfMemoryException" was thrown

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

    "System.OutOfMemoryException" was thrown

    Hi,

    (1)
    {
    startDateTime1ea = new DateTime(Time[0].Year, Time[0].Month, Time[0].Day, 9, 30, 0);
    endDateTime1ea = new DateTime(Time[0].Year, Time[0].Month, Time[0].Day, 9, 44, 59);

    int startBarsAgo1ea = GetBar( startDateTime1ea);
    int endBarsAgo1ea = GetBar( endDateTime1ea);

    do something here


    startDateTime1eb = new DateTime(Time[0].Year, Time[0].Month, Time[0].Day, 9, 45, 0);
    endDateTime1eb = new DateTime(Time[0].Year, Time[0].Month, Time[0].Day, 9, 59, 59);

    int startBarsAgo1eb = GetBar( startDateTime1eb);
    int endBarsAgo1eb = GetBar( endDateTime1eb);

    do something here

    }


    (2) I've done the above over an hour's market session and applied on FDAX 1 Range Chart. I even set begin and start time within an hour in the chart properties. If I code for the entire market session, I think it will be worst. During the application, I encountered the problems:
    (a) First, when I load up the indicator, after a few minutes, NT was foced to close down with the message "System.OutOfMemoryException" which I read from the trace file.
    (b) Second, if NT is not forced to close down, it will take unbelivable 10 minutes or even more to show the indicator on screen.(Please refer to the attachment "ntplot4' The case stayed there for the duration I mentioned above) The funny part is that the appearing of indicator takes two steps to plot.It plots my DrawLine and DrawRectangle then it stops for a minute or two (Please refer to the attachment "ntplot2") before continuing plotting my DrawRegion. The case happened when the market is very active .(That is a lot more bars than normal.)
    (3) Occasionally,when the market is active,moving of cursor seems to cause delay as well.
    (4) My indicators are only valid for that specified time range .Any new time range start,a new set of calculation is started and the previous set of calculation is not in use anymore.Is NT does all the calculations from the first bar to current bar whenever there is a new incoming tick? If so ,how can I write a logic to terminate the previous calculations which I'm not needed? Could it help in terms of CPU and Ram? I've used RemoveDrawobjects when new time range started.
    (5) I'm using XP Professional, Intel Pentium D CPU 2.8/2.79 GHz and 1.5 GB Ram.
    (6) Attachment "ntplot5' is an example of my indicator layout.
    (7) I hope you understand my explanation in such a poor English
    Attached Files

    #2
    continue from #1
    Attached Files

    Comment


      #3
      obayashi, welcome to our forums - how much history are you loading up for your Range chart of the FDAX?

      Is this on the latest NT 6.5.1000.16 release version?

      If you like to test, the performance in general and especially on Range bars would be strongly improved in our currently in beta testing NT7 version -

      http://www.ninjatrader.com/webnew/NT7/NinjaTrader7.html

      http://www.ninjatrader.com/webnew/download_download.htm

      If you want to just monitor current developments in realtime it would be best to just modify one drawing object instead of creating unique ones to recreate the historical signals -

      http://www.ninjatrader.com/support/f...ead.php?t=3419
      BertrandNinjaTrader Customer Service

      Comment


        #4
        Hi Bertrand,
        (1) Currently I'm only loading one hour of historical data.(eg from 0900 to 1000).
        (2) At present I'm using NT 6.5.1000.15
        (3) If I upgrade to NT 6.5.1000.16 or download NT7, will my current indicator lost?

        Comment


          #5
          No, you will not lose your indicators as you upgrade to a different version.
          Josh P.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Renejm, Today, 06:17 AM
          0 responses
          3 views
          0 likes
          Last Post Renejm
          by Renejm
           
          Started by kazisl, Yesterday, 06:41 PM
          2 responses
          10 views
          0 likes
          Last Post NinjaTrader_PaulH  
          Started by impactX, 05-04-2021, 01:07 AM
          2 responses
          11 views
          0 likes
          Last Post NinjaTrader_Melissa  
          Started by op1031, Yesterday, 05:51 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_PaulH  
          Started by aaadetos, 05-04-2021, 09:28 AM
          3 responses
          14 views
          0 likes
          Last Post NinjaTrader_Heath  
          Working...
          X