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

Improving indicator performance when using only historical data

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

    Improving indicator performance when using only historical data

    I often use NinjaTrader in offline mode to study and screen stocks. Generally, I connect to a BarChart datafeed and download 4-5 months of day and one minute data of 50 to 100 stocks. I then disconnect from the data feed and using the downloaded data create 2 charts:
    1 day chart (5 months of data)
    1 30-minute chart (5 months of data)
    Both charts display the same instrument.

    When I apply a custom indicator that utilizes draw methods (in particular Draw.Rectangle) to a short time frame chart (for example a 2 minute chart displaying 5 months of historical data – not a realtime chart), it can take up to three minutes to switch from one instrument to another. If I use a plot over that same period, the load time is only a matter of a few seconds max. If I use Draw.Line, it is almost as quick to load as a plot. Is there some inherent reason why Draw.Rectangle would require more time to draw objects?

    Would the IsSuspendedWhileInactive property have any relevant impact on performance when viewing charts offline using only historical data?

    I have experimented with MaximumBarsLookback but see no difference in chart load speed when switching form one instrument to another (when offline). Are there any NinjaTrader settings or indicator properties that could be set that would improve performance when using historical data offline?

    During the period when this poor performance occurs, about 6.8GB of 8GB installed RAM is being used, and usually CPU usage is on average 60% or less, but CPU usage can occasionally reach into the high 90's.
    Last edited by h1000; 11-30-2019, 05:33 PM.

    #2
    Hi h1000, Thanks for your post.

    Draw objects should not cause performance issues while no real-time data is incoming. Could you post your workspace here? The file can be located under Documents/NinjaTrader 8/workspaces. I will test it on my end and let you know if I get the same performance issues.

    I look forward to hearing from you.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      ChrisL, thanks for the response. I've got quite a bit to do right now, so I will have to put this on the backburner for a few days at least. Could I email you the workspace as well as the indicator? If yes, could you pm me your email address and any case number I should include when sending you the files.

      Comment


        #4
        Hi h1000, yes please email me the documents to platformsupport at ninjatrader.com and reference "Attn ChrisL 2348011" in the body of the email.
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by chbruno, Today, 04:10 PM
        0 responses
        3 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        436 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        6 views
        0 likes
        Last Post FAQtrader  
        Started by rocketman7, Today, 09:41 AM
        5 responses
        19 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by frslvr, 04-11-2024, 07:26 AM
        9 responses
        127 views
        1 like
        Last Post caryc123  
        Working...
        X