I made my indicators a lot more flexible by writing a base indicator that I feed all the data and which knows by passing an int parameter which MA to apply.
I got the idea when I looked at how Gumphrie used enums and with some trying I was able to come up with a nice use for them.
Now what I' really love to know is, how much does this degrade performance/memory use being a deoptimzation. Possible ways to keep this in check.
To get a bit of a performance increase I thought I'd try something else.
You can see it in the MAV 1.1, it never throws and exception an never calls OnBarUpdate, so I get nada nothing zilch.
04.11.2007 15:33:23|3|4|Error on calling the 'OnBarUpdate' method for indicator 'IndicatorX' on bar 0: Unable to cast object of type 'NinjaTrader.Data.DataSeries' to type 'NinjaTrader.Data.Bars'.
Actually the MAV 1.2 version is much worse, chart was stuck for a second after dragging.
Thanks in advance and cheers,
Rollins
Comment