Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Keeping only X bars on chart

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

    Keeping only X bars on chart

    Hi,

    I run some 1 range, or 1 second charts with the order flow depth (NT native indicator) on them (actually, just 1 most of the time). As with some of my charts, I would like to limit the bar count. This is shown most on the order depth ones. For instance. Platform running now for few hours. Memory usage 1,600Mb. Press f5 on chart that is purely 1 range with 1 order flow depth indicator on it (no other indicators at all), and after a minute or so, the released memory takes NT8 back under 600mb... I've repeated this test many, many times with the same result. In the interest of memory efficiency etc., I would suggest there should be a way to limit the number of bars on a chart to a useful amount, rather than letting them grow forever.

    If this feature exists, I've missed it, so if someone would point me in the direction!

    If not, another feature vote perhaps...

    Thanks.

    #2
    The amount of historical bars on your chart is restricted to whatever the 'days to load' setting is within the chart's Data Series. The amount of real-time bars are not restricted as it is uncommon that you would want real-time data to disappear from your charts.

    Please clarify - are you referring to just limiting the amount of bars that the indicator will plot on? In other words, it only plots on a rolling 50 bar section of the chart? If I've misunderstood your inquiry, please elaborate.

    Comment


      #3
      Originally posted by NinjaTrader_PatrickG View Post
      The amount of historical bars on your chart is restricted to whatever the 'days to load' setting is within the chart's Data Series. The amount of real-time bars are not restricted as it is uncommon that you would want real-time data to disappear from your charts.

      Please clarify - are you referring to just limiting the amount of bars that the indicator will plot on? In other words, it only plots on a rolling 50 bar section of the chart? If I've misunderstood your inquiry, please elaborate.
      Hi,

      Yes, but there in lies the issue. I have my chart set to 50 bars only, which is duley loads on startup. However, through the hours, on short term charts, that grows significantly, yet I never need to see / look at those old values, but there they are, consuming resources (it seems, unless the order flow depth thingy has a memory leak/issue).

      Try it - Set up a 1 range line chart with just order flow depth map and have it load just 100 bars (I'm looking at NQ btw). Check memory usage. Leave it run for a few hours when market is open. Re-check NT memory usage. It will likely be much higher. Then press f5 to reload the order flow depth chart. Wait a minute or 2 for .net to do some garbage clearance and bam, you just got 1gb of memory back from nt. That doesn't seem right to me...

      Comment


        #4
        I would expect memory to increase as more items are built on your charts in real-time and it is also expected that .NET garbage collection doesn't always work intuitively or the way we want it to. Unfortunately there is no way to work around that .NET limitation. With that said, When I test on my end, I do not notice a steady increase in memory usage. This was after about 20 minutes of testing:



        Please clarify - am I just not testing for long enough here? What is the base memory usage on your end?

        Comment


          #5
          Hi,

          Thanks for trying. Possibly not long enough - I am noticing it after a few hours. I will try to get a video example with task manager etc shortly, to show it - I refreshed my chart about 30 mins ago...

          Comment


            #6
            My memory has actually gone down since I took that first screenshot. I have a feeling there may be some other element contributing to the symptom on your end. Please send me your workspace, log, and trace files so that I may look into what occurred.
            • You can do this by going to the Control Center-> Help-> Email Support
            • Expand 'Other files' and enable 'Workspace files and UI settings'.
            • Please reference the following ticket number in the body of the email: 2027166 ATTN PatrickG

            Comment


              #7
              Will do. I'm not talking about small amounts of memory, 10Mb etc, but 600mb, or 1000mb, or more... Just seems odd that leaving the chart running will seemingly eventually kill the platform because resource usage will grow, and grow, and grow...

              Comment


                #8
                The memory leak and your PC running out of memory is what 'kills' NinjaTrader. We need to figure out what is causing that memory leak.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by DJ888, 04-16-2024, 06:09 PM
                6 responses
                18 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by Jon17, Today, 04:33 PM
                0 responses
                1 view
                0 likes
                Last Post Jon17
                by Jon17
                 
                Started by Javierw.ok, Today, 04:12 PM
                0 responses
                6 views
                0 likes
                Last Post Javierw.ok  
                Started by timmbbo, Today, 08:59 AM
                2 responses
                10 views
                0 likes
                Last Post bltdavid  
                Started by alifarahani, Today, 09:40 AM
                6 responses
                41 views
                0 likes
                Last Post alifarahani  
                Working...
                X