Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Data feed - computer can't keep up

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

    Data feed - computer can't keep up

    When the market has a lot of volume and your computer is behind in processing the data, is there a way to determine in ninjascript that the data being received is not the most current.

    #2
    Hello kenconcannon,

    Thank you for your note.

    No really great way to do this in code. There's a couple indicators users have made that try to measure chart lag by comparing tick timestamps to the PC Clock, but this is going to add to any performance issues, especially if it's running OnEachTick.

    A better route to go would be to try to reduce the load on your PC's CPU and memory, as slow performance is typically attributed to an overworked CPU.

    The performance when NinjaTrader is loading a workspace or opening a chart is attributed to the processing of historical data. After the workspace or chart has loaded and all historical data has been processed the performance is primarily affected by real-time data being processed.

    You can experience unresponsive behavior in NinjaTrader if you have many charts, indicators and other windows opened and this is depending on market volatility as well.

    Focusing on real-time performance (after the workspace or chart has loaded):

    Using 3rd party addons that use lots of resources can cause performance freezes, especially during peak trading.

    The 'Calculate' setting for indicators can be important. If set to On Each Tick, the indicator will be calculated on each incoming tick. During high volatility this can be very CPU intensive especially if the indicator makes complicated calculations. Many indicators do not need to calculate with each tick, and can be set to use either On Bar close, which will only be calculated at the end of each price bar which reduces the load on your computer by a large amount, or On Price Change, which will reduce calculations to only calculate when the price changes.

    The greater the number of charts open with indicators running with Calculate set to On Each Tick, the more demand is placed on the CPU.

    There also may be a recent increase in market activity for an instrument. The more ticks the exchange sends out, the more CPU cycles that need to be processed by NinjaTrader. This means a workspace/chart setup that was working fine for the last few months may not now have the overhead to keep up with the sheer number of ticks that are being processed today or in the last few days.

    If you have workspaces opened in the background which you do not use, we suggest that you close such workspaces. Workspaces that are open but not currently visible will be displayed with a gray box next to their name in the Workspaces menu.

    On the chart, other items that will improve real-time performance:
    • Remove redundant charts and indicators
    • Set as many chart indicators as possible to 'Calculate' as On Bar Close
    Below is a link to the help guide on Working with indicators. Please see the section on 'How to edit an indicator's parameters'.
    https://ninjatrader.com/support/help...torsParameters

    More tips and suggestions to improve the performance of NinjaTrader can be found at the link below.

    https://ninjatrader.com/support/help...ance_tips2.htm

    Please let me know if reducing the load on the CPU does not improve the performance.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the info!

      Comment


        #4
        Absolutely ridiculous response from Ninjatrader AGAIN. Reducing the CPU load of our computers is a bloody joke, this also happens on a computer with the most powerful CPU ever. Your platform is the problem, it's slower than the pope in a heart attack.

        If your platform can't handle all the data that's coming in, why don't you add an option to limit it?

        Another idea, if the chart is displaying a market that is live, why do you force the chart to display data from the past? If X price change is more than Y milliseconds old, SKIP IT!

        Im so tired of this chart lag issue.

        NinjaTrader_Kate
        kenconcannon
        NinjaTrader_ChelseaB

        Comment


          #5
          Originally posted by kenconcannon View Post
          When the market has a lot of volume and your computer is behind in processing the data, is there a way to determine in ninjascript that the data being received is not the most current.
          Yes, get the ChartLagTime script here. You only need to install it on one chart of each instrument that you want to monitor. All charts of the same symbol have the same lag. At 300ms lag, the lag indication will show orange. At 1 sec lag, the lag indication will show red. You can adjust that in the script if you want something else.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by AveryFlynn, Today, 04:57 AM
          1 response
          10 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by Max238, Today, 01:28 AM
          4 responses
          37 views
          0 likes
          Last Post Max238
          by Max238
           
          Started by r68cervera, Today, 05:29 AM
          1 response
          8 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by geddyisodin, Today, 05:20 AM
          1 response
          11 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by timko, Today, 06:45 AM
          2 responses
          14 views
          0 likes
          Last Post NinjaTrader_ChristopherJ  
          Working...
          X