Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart refresh rate

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

    Chart refresh rate

    Is there a way of increasing the Charts refresh rate?
    Plotting market data events is very sluggish right now.
    The UI seems to have a maximum refresh rate.
    Many market events are plotted in chunks which doesn't make a very good visual feedback.

    #2
    The current hard-coded refresh rate for charts is 250ms.

    Can you tell me more about what you're experiencing and, if there are any, steps to reproduce what you're seeing?

    Comment


      #3
      The refresh rates are set by NT. Not sure on current rates, but in the Beta they were actually slower than NT7 (see http://ninjatrader.com/support/forum...ht=update+rate).

      That thread will give some clues on how to force updates for indicators etc, but be careful because if you do not limit the number of updates you will blow NT out of the water. I would suggest limiting to max update interval of 50ms. You can go faster, but your mileage may vary.

      This new platform has some good potential, but this area is concerning. You have other platforms that use software based rendering and can keep up with depth updates with minimal CPU load, and the the new NT uses graphics hardware and is currently struggling. Hopefully it will continue to improve as new revs come out.

      I would hope that a simple charting platform should be able to update at 30-60 frames per sec and not break a sweat.

      Comment


        #4
        One thing to note, if anyone is looking at this, is that the refresh rate should really be set on a per window basis. Most windows are fine with the current slow refresh rate, but certain windows contain time sensitive info and require faster updates.

        I am controlling this via indicators, but would be nice if it was settable on per window basis. Using indicators requires more events which are not required (market data/depth).

        Comment


          #5
          Thanks for the suggestion aslane. I will submit this as a feature request.

          Comment


            #6
            Originally posted by aslane View Post
            I am controlling this via indicators, but would be nice if it was settable on per window basis. Using indicators requires more events which are not required (market data/depth).
            Have you achieved to change the refresh rate of an indicator?

            It would be useful to know, as a temporary workaround if it's possible to change the refresh rate in code or in some other way.

            Is it possible to force a render refresh?

            Comment


              #7
              Yes it is possible in code. To do it use Dispatcher.InvokeAsync() to call ChartControl.InvalidateVisual(). The dispatcher must be used in order to get the InvalidateVisual to be called on the correct thread or you will take an exception.

              It is really important to limit these calls though. If you blindly call this on every trade or depth update you will hang NT. To limit, you need to track the times of the calls and be sure you only call every N ms.

              I would not recommend doing this unless you know what you are doing.

              Comment


                #8
                Thanks! that's good to know.

                I would try at least 33ms, that would give a nice 30 fps. I would check how long it has passed since last refresh and only allow it if it's longer than 33ms.

                I think I know what I'm doing, been programming for quite some years, including real time charts. I'm just starting with c# and NT now, so I'm not familiar with it.

                So how is this used in c#, something like this?

                Code:
                Dispatcher.InvokeAsync(async () =>
                				   {
                				    	ChartControl.InvalidateVisual();    
                				    }
                );

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by bmartz, Today, 09:30 AM
                2 responses
                11 views
                0 likes
                Last Post bltdavid  
                Started by f.saeidi, Today, 11:02 AM
                1 response
                4 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by geotrades1, Today, 10:02 AM
                4 responses
                12 views
                0 likes
                Last Post geotrades1  
                Started by rajendrasubedi2023, Today, 09:50 AM
                3 responses
                16 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by lorem, Today, 09:18 AM
                2 responses
                11 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Working...
                X