Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

***** out of memory exception: too much data to print, all output is deleted *****

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

    ***** out of memory exception: too much data to print, all output is deleted *****

    I got this message in the Output window today.

    ***** out of memory exception: too much data to print, all output is deleted *****
    I haven't seen it before and I would like to find out if it is a problem with the way I have scripted my Print statements to add to the output window.

    Please advise,

    thanks.

    #2
    adamus, I believe there's a limit imposed yes, I'll check with development at what point it would trigger.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      adamus, the limit would be at 10.000.000 lines - I would suggest to revert to custom logging to txt files for your needs then.
      BertrandNinjaTrader Customer Service

      Comment


        #4
        Hi Bertrand

        10^7 lines - but at what point? I only ever log one line at a time. Although I do considerable logging, there's no way that I got near 1 million lines today doing the logging I always do, let alone 10 million. So I am trying to work out what happened still.

        It's not actually a problem anyway because I am used to the Output window buffer filling up and the earlier print statement disappear.

        Thanks

        Comment


          #5
          adamus, I could unfortunately not yet deduct how it played out - I agree the line limit would be hard to trigger, were you experiencing a crash at the same time as you perhaps generally ran out of memory on your system? Is a 64 or 32 bit one?
          BertrandNinjaTrader Customer Service

          Comment


            #6
            It's a 32 bit system. It didn't crash - at least not at that point - but I was loading a huge amount of data for 20 different instruments in the same strategy.

            Comment


              #7
              adamus, could you post the code you're using to print to the output window?
              AustinNinjaTrader Customer Service

              Comment


                #8
                Code:
                private void log(DateTime when, string sysTitle, 
                    string marketName, TradingEnabled direction, 
                    Period timeFrame, double amount, string msg)
                { 
                    string timeFrameName = "n/a  ";
                    if (timeFrame != null)
                        timeFrameName = timeFrame.Value 
                            + timeFrame.Id.ToString().Substring(0,3);
                    string logDesc = sysTitle + " " + marketName
                        + " " + timeFrameName
                        + " " + direction.ToString() + " " + amount.ToString("0");
                    string timestamp = when.ToString("yyyy-MM-dd HH:mm:ss");
                    if (logging == LogOutput.FILE)
                        writeToFile(timestamp + " " + logDesc + " " + msg);
                    if (logging == LogOutput.SCREEN)
                        Print(timestamp + " " + logDesc + " " + msg);
                }
                Hi Bertrand,
                that's the function I use and the only parameter that can be more than 1 number or 1 word long is the msg parameter, and it's maximum is 100 characters, normally less.
                Last edited by adamus; 02-07-2011, 06:53 AM. Reason: correcting spelling

                Comment


                  #9
                  How often is this log function called in your scripts?
                  AustinNinjaTrader Customer Service

                  Comment


                    #10
                    Every bar, once, maybe twice. Plus on orders & executions, startup, termination.

                    Comment


                      #11
                      adamus, the issue here then is very likely your data(over)loading - NT was running out of memory here and we would then suggest to retry on a streamlining setup not using as much resources. Going 64 bit would also give you access to using more memory since you would not run into Win 32 bit limitations.
                      BertrandNinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Shansen, 08-30-2019, 10:18 PM
                      24 responses
                      938 views
                      0 likes
                      Last Post spwizard  
                      Started by Max238, Today, 01:28 AM
                      0 responses
                      3 views
                      0 likes
                      Last Post Max238
                      by Max238
                       
                      Started by rocketman7, Today, 01:00 AM
                      0 responses
                      2 views
                      0 likes
                      Last Post rocketman7  
                      Started by wzgy0920, 04-20-2024, 06:09 PM
                      2 responses
                      27 views
                      0 likes
                      Last Post wzgy0920  
                      Started by wzgy0920, 02-22-2024, 01:11 AM
                      5 responses
                      32 views
                      0 likes
                      Last Post wzgy0920  
                      Working...
                      X