Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Memory Issues

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

    Memory Issues

    Why ninja not clean memory If I close workspace.

    WHy ninja is using so much memory.
    I have simple strategy which is not using lot of stuff. But I still have to restart everyday.
    I can't give it to my clients and tell them they have to restart everyday. Please give me tips how I can clean memory my self, once a day. or what i can do.
    I have six years experience of programming ninja. There is no stupid mistakes in my code.
    regards

    #2
    Hello jokujoku,

    Am I correct the strategy is still running when you close the workspace? How many charts and other windows did the workspace contain that you closed?

    Do you experience so much memory being used by NinjaTrader when you do not run the strategy?

    Does memory usage increase the longer you run the strategy?

    Please see the tips and suggestions at the link below to improve the performance of NinjaTrader and decrease memory usage.
    http://www.ninjatrader.com/support/helpGuides/nt7/performance_tips2.htm
    JasonNinjaTrader Customer Service

    Comment


      #3
      In China there is working people saying they will jump from roof in xbox factory

      Do I have to burn my self to get proper help.


      First those are two different questions.


      Originally posted by NinjaTrader_Jason View Post
      Hello jokujoku,

      Am I correct the strategy is still running when you close the workspace? How many charts and other windows did the workspace contain that you closed?
      no,
      two charts one minute charts seven day back.


      Do you experience so much memory being used by NinjaTrader when you do not run the strategy?
      WHAT ? i think no

      Does memory usage increase the longer you run the strategy? WHAT ???
      Please forward this question, to somebody else, i am so close to quit using ninja.
      Offcourse its increasing, I am not asking help, if its not increasing, if its decreasing.


      Please see the tips and suggestions at the link below to improve the performance of NinjaTrader and decrease memory usage.
      http://www.ninjatrader.com/support/helpGuides/nt7/performance_tips2.htm
      Last edited by jokujoku; 01-12-2012, 07:14 AM.

      Comment


        #4
        Hello,

        NinjaTrader is run on thousands of PC's and we do not run into memory problems on these PC's. This most likely is a strategy or indicator coding issues that is causing the memory problem. However I will not dismiss the fact that there is a possibility of this being the case until I get further information.

        I know you have been coding for a while as you state it in your forum post and furthermore been a member with NinjaTrader for a while. With that said we expect that post on our forum are civil and professional. Remember we are trying to help you out and we are not working against you. Please keep this in mind moving forward.

        The nature of Jasons question was to help us find out what the memory use curve looks like. This would help us find out what might be causing the issue.

        We needed to know:

        A) Its slowly ramping up over a long period of time.
        B) All the sudden some action is taken and RAM jumps up.


        Finally, you said the following:

        Do you experience so much memory being used by NinjaTrader when you do not run the strategy?
        WHAT ? i think no
        This is the what we need to know next on how to further proceed. The questions is with the strategy removed from NinjaTrader, does NinjaTrader have the memory problem. You reported that you think it does not. In this case the leads me to believe the strategy is causing the memory leak.

        We cannot debug your code in detail, however what I can do is offer to take a quick look at the code to see if I can see where you are instantiating an object that is never getting cleared from Memory. Remember, you are coding in C#. With your C# programming background you should recall that Memory is managed by the CLR and does its own garbage collection and is managed in the background by the .net framework. IF memory is increasing it means you still have references to objects that you do not want.

        The last note I have, in your strategies or indicators are you writing any data to the log or trace file? If you write data to these these log and traces files needed to be loaded into memory and if they get to big will cause memory issues. I have run into this a couple times and I do not know if it applies to you however I wanted to mention it in case you are.

        -Brett

        Comment


          #5
          Brett thanks for reply and I try to be civil and behaving. and I am sorry if i heart somebodies feelings.

          I don't have c# backgroound, just coding ninja.
          Anyhow I have 30 years coding background.
          This closing workspace is totally diffrent question, its just like if i close any workspace without strategy running it, there is no print or log statement active in code.
          If you give your mail address i can send code to you. I do it later, today, when finnish trading, I remove all comments from code, and rules. but you can see and run it. without executing trades.

          Comment


            #6
            support at ninjatrader dot com and reference this forum post.

            Include exact run steps and steps to run into the memory problem so that I can reproduce it on my side please.

            -Brett

            Comment


              #7
              You have to run it at least hours to see it's not normal.
              I don't belive there is thousend of live strategies running in pc's. In this world is not 1000 of working strategies. its possible to trade hand, but making software to run its much harder.
              I don't have any problems to use just charts. And ealier what i have talked directly with people, there is some memory problems, with replay data feeds & strategies.

              Comment


                #8
                I am just wondering, can CurrentDayOHL leak memory, i am using every minute
                because i checked code there is no print or log statements active and trace is false
                all other indicators which calculates values are just standard indicators.

                Comment


                  #9
                  How are you calling it? Just accessing its value like a normal indicator or you doing something different?/ Code snippit please.

                  -Brett

                  Comment


                    #10
                    todayrange2=CurrentDayOHL().CurrentHigh[0]-CurrentDayOHL().CurrentLow[0];

                    All my variables are declared in variables sections.

                    I also think Drawtextfixed may do problems, because sometimes ealier before i fixed it was overwriting older text, and making mess. i will removit if its helps.
                    I have made small changes and monitoring
                    I am calculating about 20 diff values, my strategy is running 1 min chart and also using 150 range bars.
                    I have EURUSD,USDCHF two charts memory consumption is 87M every hour.

                    Comment


                      #11
                      Hello,

                      After you make the changes please let me know at support at ninjatrader dot com and send the code I can take a quick look and offer suggestions.

                      -Brett

                      Comment


                        #12
                        I will i try to clean and make it for you because its checking trading times.
                        But now it was big surprise for me ninja cleaned memory when I minimized, about 50M
                        I still check about half hour how its behave.

                        Comment


                          #13
                          I sent strategy to you.

                          Comment


                            #14
                            Received. Will follow up via email.

                            -Brett

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by bortz, 11-06-2023, 08:04 AM
                            47 responses
                            1,610 views
                            0 likes
                            Last Post aligator  
                            Started by jaybedreamin, Today, 05:56 PM
                            0 responses
                            9 views
                            0 likes
                            Last Post jaybedreamin  
                            Started by DJ888, 04-16-2024, 06:09 PM
                            6 responses
                            19 views
                            0 likes
                            Last Post DJ888
                            by DJ888
                             
                            Started by Jon17, Today, 04:33 PM
                            0 responses
                            6 views
                            0 likes
                            Last Post Jon17
                            by Jon17
                             
                            Started by Javierw.ok, Today, 04:12 PM
                            0 responses
                            16 views
                            0 likes
                            Last Post Javierw.ok  
                            Working...
                            X