Hi,
Below the code i'm trying to use in my strategy.
I'm looking to retrieve the K and D values of the stoch after bar0 has been detected as being a full bar.
The period and offerside settings have been checked and correct.
The values i print (whilst running in Eclipse) are not lined up with those on screen when running the tester.
The bar however does show the exact values. So at least something is going right ..

1. Could someone please let me know whether the code used below is correct and should supply the same results as on screen
2. What effect do the candlesBefore and after have on the selection. if after>1 then no data comes through at all!?
Tia,
Fermin DCG
private double calculateStoch(Instrument instrument, Period period, IBar bar0) throws JFException {
int fastK = 26;//13
int slowK = 9;//5
int slowD = 9;//5
MaType slowKMA = MaType.TEMA;//MaType.SMA;//
MaType slowDMA = MaType.WMA;//MaType.SMA;//
int candlesBefore = 3;
int candlesAfter=0;
int upperStochLimit=80;
int lowerStochLimit=20;
messageStoch=null;
double stochX=0;
int boundaryX = 0;
if (period==Period.ONE_HOUR) {
double[][] stoch = indicators.stoch(instrument, defaultPeriod, OfferSide.ASK, fastK, slowK, slowKMA, slowD, slowDMA, Filter.WEEKENDS, candlesBefore, bar0.getTime(), candlesAfter);
...