Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Lagging screen

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

    Lagging screen

    Is there some information on the site regarding how computer resources are allocated? I'm getting some lagging on one of my charts and trying to figure out why. Does multiple tabs impact it? I know T&S and Level 2 are resource intensive, but the indicators where I use that are also on other chart windows and not lagging. Is it using tick data? The data series length? Just looking for ways to reduce the resources used.

    #2
    Hello Chippy,

    The main factor with multiple threads has to with the number of different instruments being loaded in your workspace. An instrument can only be assigned to one thread, and this is because if multiple threads were used per instrument it is possible that the windows could get out of sync with each other. As an example, if you have 30 charts with the same instrument being loaded, all of those charts would utilize the same thread. If you have 30 charts with a different instrument in each chart, 30 different threads would be used. This is briefly described in our performance tips, particularly in tip #8.

    We also have had some in-depth discussions regarding PC Resources and how NinjaTrader does multi-threading in our support forums. I have included some helpful links below if you'd like to take a look at those tips and one of those discussions.You can also see what (if any) NinjaScript items may be contributing to the symptoms, please open the NinjaScript Utilization Monitor:
    • Control Center > New > NinjaScript Output
    • Right-click within the NinjaScript output window > Select 'NinjaScript Utilization Monitor...
    • This window will begin to populate with NinjaScript items in order of time spent processing
    • Let this window populate for at least a few minutes
    Correct the more days you are loading within a chart will require additional processing when comparing for example a tick chart loading 3 days to a tick chart loading 5 days therefore reducing the Days to load will help with performance as well as closing any charts or tabs that are not needed.

    Tick data is more CPU intensive were as when loading Tick data there is a line of code for every execution that occurs where as when comparing to Minute data there there is only a single line of code for each minute as referenced in the data example below.

    Minute Data Format:
    The format is:
    • yyyyMMdd HHmmss;open price;high price;low price;close price;volume
    Sample data:
    • 20061023 004400;1377.25;1377.25;1377.25;1377.25;86
    • 20061023 004500;1377.25;1377.25;1377.25;1377.25;27
    • 20061023 004600;1377.25;1377.25;1377.25;1377.25;24
    Tick Data Format:
    • yyyyMMdd HHmmss;price;volume
    Sample data:
    • 20061107 000431;1383.00;1
    • 20061107 000456;1383.25;25
    • 20061107 000456;1383.25;36
    I have provided a link below to our Help Guide that goes over performance tips:
    Christopher J.NinjaTrader Customer Service

    Comment


      #3
      Chippy, More info here.

      Comment


        #4
        Originally posted by Lancer View Post
        Chippy, More info here.
        Thanks, Lance... I missed an exit and lost 10 points on the MES because of lag at the close today. DOM seemed close and I happened to notice the the PnL marker on the chart was at $2 even though the chart was showing I had more than 10 points profit. That's scary because I'm worried that if there is so much lag I may not even get my trades exectute. RTH are over now and I'm getting lag in excess of 0.5. What should be expected? Seems like a half second is a lot.

        Also, I often use the right mouse button/Flatten Everything to exit. The voice has been saying, "Order Canc.... Order Filled." Is that lag related?

        Comment


          #5
          Maybe you have already installed it, but to be visually alerted to chart lag events, download and import into NinjaTrader the ChartLagTimeV3 script here. It will then be on the Indicators list and you can add it to any chart. All charts of the same market symbol will have the same lag, so you only need to add it to one chart per market. It will display text in the chart upper right corner, showing clock time, then chart time, and the difference (lag). When lag is >= 300ms, the text is orange, when >= 1 sec, the text is red. At market close I have lag a lot greater than 0.5 (500ms), to the point I don't even try to trade the last 10 minutes into close, usually, so your 0.5 at market close is very good. As to the cropped sound file, I couldn't say if that is lag related.

          Comment


            #6
            #Chippy, my 10c would be take an approach of building from the bottom up starting with an absolute de-minimus workspace version that meets your needs & prove it under the conditions you wish it to perform. Only when you have this proven base, think about adding anything which isn’t absolutely need to have to it.

            Ninja’s definition of proving the platform is performing as expected and acceptable is one instrument, one naked chart in Safe Mode. Anything more is not to be expected, it should be considered an aspiration.

            I don’t know your setup & aspiration but fwiw ES (&NQ) are of the instruments more susceptible to lag problems in my experience. My current workspace includes ES/NQ/RTY/YM concurrently & I don’t experience lag through NYO, Close, News, flash stop hunts etc. (according to ChartLagMeasurement).
            It took several hundreds of hours & rejecting Ninja’s obfuscation & deflection to achieve this.

            Re: soundfile issue/lag - yes, imho it is very likely symptomatic of platform lag (not necessarily causal, likely symptomatic) I recall experiencing this. When I migrated my NT7 setup to NT8, NT8 was released with all sorts of potentially useful (to me) shiny new bells & whistles which included Alerts & the ability to show indicators on the DOM. Both were an unmitigated disaster contributing to platform lag due to the time it takes the platform to execute the code required for these (forget cpu, threads etc) & architecture. I mention this because what I recall is that sound files would ‘queue’ & in turn bottleneck the platform execution. What you describe sounds (!) familiar.

            My point fwiw is to emphasise the de-minimus starting point. It may seem ridiculous, but if this sound file playing is happening it is very likely indicative of lag problems so I’d delete the sound files so they don’t play & thereby eliminate their playing from contributing to the lag. Take this same approach to a workspace containing only MES DOM & chart & only when you have no lag when you want it (which seems you want to be able to trade, or at least have workspace open through NYO/C etc, & place orders).

            If you find you can’t achieve this with ‘your’ de-minimus, you might have to re-visit if that can be reconsidered, or look into things like internet connection speed, hardware but I agree with others’ comments here - these are invariably found to be non-contributory & are used as deflection & obfuscation resulting in many hours of wasted time. The same with Utilization monitor. Start with only what you can’t live without, rather than looking for what might be consuming resources. Utilising resources isn’t necessarily a problem if you have the resources available.

            To give you an idea of just how fickle a mistress NT8 can be, my setup is now reliable for some time & I have confidence in its performance under any market conditions. The last time I thought I might modify I chose to add one nice to have indicator (Round Numbers - enhancements to simple chart gridlines which iirc is a Ninja add-on). Add to one chart per instrument (4 off) & had lag at NYO. I just don’t do that any more ;-)

            Good luck in your endeavours & hope this may help

            Comment


              #7
              brucerobinson Thank you. That was a much appreciated effort. I have minimized as much as I can possibly stand. Still, I don't think it will make much difference. The problem is that I really have no great way of testing this except wait for fast moving markets. I've installed the lag indicator and will probably modify it to print a time stamp whenever it exceeds a second. I don't think I have a problem with my internet. I live VERY rural, and our high speed is supposed to be 25mbs download. It gets close to that. Streaming high quality video isn't usually a problem. We're expecting optic fiber within a couple months.

              Since I'm only using a single instrument with about 5 windows, 10 total tabbed charts and a DOM. It really doesn't seem like a lot. Somewhere on the NT docs I read that "20 charts will perform better than 200" ... well, duh! But can it DO 20 charts?

              I did write a couple custom indicators that I rely on heavily, which utilize tick-based Time & Sales. The processing of each tick is minimal. Basically it just determines if the tick is a bid or ask and assigns it to a variable. Elsewhere, that variable is used by OnBarUpdate calculated on price change. I imagine this is going to require a little trial and error. I appreciate your valuable insight.

              Comment


                #8
                @Chippy,
                - internet connection: I live very rural too, my experience is latency trumps bandwidth on this issue - lag in fast markets. I get the impression that what’s going through the pipe isn’t data-heavy (sense check: gamers can do 120fps with mind-blowing rich-texture graphics. Our ask is a few simple 2D charts). My connection is 12mb on a good day. Fibreoptic - I’ve got aluminium, not even all copper. Same applies to Wi-Fi - I use a Wi-Fi bridge between office upstairs & router downstairs. Wi-Fi these days is as fast and reliable as is necessary. My round trip ping to AMP Futures’ servers is typically <120ms. IF this deteriorates significantly I may get lag in fast markets.
                Point I’m trying to make is to focus on getting a setup that will work and take it from there, otherwise you’ll get deflected in every spurious direction except focusing on the core platform’s ability to process in fast moving markets
                It sounds like it should be with your base setup (I.e. it sounds ‘light’, single instrument & a few charts & a few tabs (hence running in background. Again, FWIW, I had multiple tabs (different timeframes) on the basis running in background doesn’t use resources ‘Suspend if inactive’). Now I don’t, if I want a different timeframe I change the data series. This is what I mean by de-minimus to prove it…Are those tabs Must Haves to Prove it?

                To ‘prove’ the minimalist setup in practice, real world suggestion. You mention your T&S-based custom indicators are possible bad boys. Create a duplicate minimalist workspace (maybe with no extra tabs) and without your T&S custom indicators. Use this workspace as a test say at NYO, NYC, on FOMC or NFP times. I.e. stress test it under the conditions you’re experiencing difficulties. You don’t have to lose day(s) of trading using a workspace unsuitable for your needs, you simply prove whether a minimal workspace without your custom indicators can handle NYO etc. If it can’t, you know that whilst doesn’t have your customs you need, they are not the problem per se (albeit may add). On the other hand if the minimalist workspace doesn’t lag, you have something to build upon. If experiencing lag at NYO is a common experience for you, & you suspect custom T&S indicators are worthy of attention, it seems should be fairly easy to try a setup without them through the hullabaloo. If it still lags without them…. If it doesn’t…… You can still use your lagging workspace trade the rest of the day when it doesn’t lag.

                That’s another 10c, FWIW ;-)
                Good luck

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by fx.practic, 10-15-2013, 12:53 AM
                5 responses
                5,404 views
                0 likes
                Last Post Bidder
                by Bidder
                 
                Started by Shai Samuel, 07-02-2022, 02:46 PM
                4 responses
                95 views
                0 likes
                Last Post Bidder
                by Bidder
                 
                Started by DJ888, Yesterday, 10:57 PM
                0 responses
                8 views
                0 likes
                Last Post DJ888
                by DJ888
                 
                Started by MacDad, 02-25-2024, 11:48 PM
                7 responses
                159 views
                0 likes
                Last Post loganjarosz123  
                Started by Belfortbucks, Yesterday, 09:29 PM
                0 responses
                8 views
                0 likes
                Last Post Belfortbucks  
                Working...
                X