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 gravdigaz6, Today, 01:43 AM
      0 responses
      3 views
      0 likes
      Last Post gravdigaz6  
      Started by DayneSwift, Yesterday, 11:06 PM
      0 responses
      2 views
      0 likes
      Last Post DayneSwift  
      Started by AidanLawrence, Yesterday, 10:03 PM
      0 responses
      2 views
      0 likes
      Last Post AidanLawrence  
      Started by butt_toast, Yesterday, 09:47 PM
      0 responses
      3 views
      0 likes
      Last Post butt_toast  
      Started by GaryOz, Yesterday, 06:54 PM
      0 responses
      5 views
      0 likes
      Last Post GaryOz
      by GaryOz
       
      Working...
      X