hi team - I'm a relative newbie, so please forgive the school-boy question ... but is there really an efficiency (i.e. execution speed) difference between these two methods of getting a simple Indicator value in my onTick code:
1. Object[] indicatorResult = indicators.calculateIndicator(selectedInstrument, selectedPeriod, new OfferSide[] {OfferSide.BID}, selectedMaTypeString, new IIndicators.AppliedPrice[] {IIndicators.AppliedPrice.CLOSE}, new Object[] {MABars5}, 0); double MA5 = (Double) indicatorResult[0];
2. double MA5 = indicators.ma(selectedInstrument, selectedPeriod, offerSide, appliedPrice, MABars5, selectedMaType, 0);
I prefer the simplicity of the second method, but in backtesting it seems to run a LOT slower ...
|