Hi,
according to javadoc the stoch method should return shift+1 values in the returned array
double[] stoch(Instrument instrument,
Period period,
OfferSide side,
int fastKPeriod,
int slowKPeriod,
IIndicators.MaType slowKMaType,
int slowDPeriod,
IIndicators.MaType slowDMaType,
int shift)
throws JFException
using this line of code
double[] stochastic = indicators.stoch(instrument, fixedPeriod, side, fastKPeriod, slowKPeriod , slowKMaType,
slowDPeriod, slowDMaType, 5);
the double array is getting only 2 positions created. a reference to stochastic[2] or stochastic[3] is raising an exception.
tested on EUR/USD, 15 mins with
private OfferSide side = OfferSide.BID;
private int fastKPeriod = 5;
private MaType slowDMaType = MaType.SMA;
private int slowKPeriod = 3;
private MaType slowKMaType = MaType.SMA;
private int slowDPeriod = 3;
please check or correct me if i am wrong.
many thanks
camapeta