The indicator fails to display any value within onBar/onTick method after setting the ITesterClient object's data interval as below:
client.setDataInterval(ITesterClient.DataLoadingMethod.ALL_TICKS, startDate, endDate);
To give an example. We take the singlejartest package that comes with the API. if we set the Data Interval within "TesterMain.java", the code will not work as indicator in onBar/onTick will output invalid values.
(TesterMain.java)
...
//set instruments that will be used in testing
Set<Instrument> instruments = new HashSet<Instrument>();
instruments.add(Instrument.EURUSD);
LOGGER.info("Subscribing instruments...");
client.setSubscribedInstruments(instruments);
//setting initial deposit
//when inserted the code below, the tester will not work
SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
sdf.setTimeZone(TimeZone.getTimeZone("GMT"));
long startDate = sdf.parse("10.09.2011 00:00:00").getTime();
long endDate = sdf.parse("11.09.2011 00:00:00").getTime();
client.setDataInterval(ITesterClient.DataLoadingMethod.ALL_TICKS, startDate, endDate);//set date
client.setInitialDeposit(Instrument.EURUSD.getSecondaryCurrency(), 50000);
//load data
LOGGER.info("Downloading data");
Future<?> future = client.downloadData(null);
//wait for downloading to complete
future.get();
...
Regards