Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market Analyzer perfomance

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

    Market Analyzer perfomance

    As previously posted, I have some fair sized Market Analyzer windows, and they take quite a while to recalculate. Since the columns are my own custom indicators, I thought that perhaps that might be the problem, or at least an area where I could improve performance.

    So I created an MA window with 1550 rows and just two columns -- Instrument (the symbol) and my indicator. .Market Analyzer # of bars is set to 512 and indicator the same. The indicator is heavy with linear regressions and with exponentiation to annualize. The indicator does not pay attention to being in MA and so calculates every bar, just as on a chart, even though it does not need to calculate until the last bar.

    Well, I got surprised. I turned off my connection, so I would update from local cache, and the network would not be a factor. I clicked F5 (refresh) and timed the result. What surprised me is that I could not tell the difference between running everything, and running with the first statement in OnBarUpdate() being "return;" There was no measurable difference if I eliminated ALL of the heavy indicator computing. Maybe up to a second if I am being generous. It took about 20-21 second to update, whether or not OnBarUpdate() was doing any work. CPU use was heavy, but not saturated.

    What I found extremely interesting is that, as far as I can tell, the time is consumed almost entirely by Market Analyzer, and the amount my indicator consumes is in the noise -- even with all the math it does. I'm just passing this along as food for thought. Is this a well-known observation? Do others have the same experience?

    --EV

    #2
    Hi ETFVoyageur,

    By having 1550 rows in the Market Analyzer NinjaTrader is going to have to do a lot of work to update the prices on these instruments.

    It would be expected that this takes a while to update even without any indicator columns and I would expect it to take even longer if there is a lot of code in added indicators.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      The interesting finding was that just about all of the compute time is spent on overhead (i.e. not in OnBarUpdate()).

      So little was spent in the actual desired computation that it is not worth my time to spend much effort trying to optimize that. Even when I tried it with 8 identical columns, the compute time in OnBarUpdate() was only 19 seconds out of 4:54 total time.

      Just an observation.

      --EV

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by martin70, 03-24-2023, 04:58 AM
      15 responses
      114 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by The_Sec, Today, 02:29 PM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by jeronymite, 04-12-2024, 04:26 PM
      2 responses
      31 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by Mindset, 05-06-2023, 09:03 PM
      10 responses
      265 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by michi08, 10-05-2018, 09:31 AM
      5 responses
      743 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X