Because of my own developed indicator complicity, performance is not great. How to limit calculated bars qnt-y? By default it process 10.000 bars. I need just 100.
Thank you.
API Support
Post subject: Re: Limit calculated bars in histogram of indicator
One can just set to Double.NaN first 9900 elements in output array and calculate values only for 100 last elements.
public IndicatorResult calculate(int startIndex, int endIndex) { int i, j; for (i = startIndex, j = 0; i <= endIndex; i++, j++) { if (endIndex - i >= 100) { outputs[0][j] = Double.NaN; } else { // complex calculations outputs[0][j] = ...; } } return new IndicatorResult(startIndex, j); }