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
Comment