I tested the getFXSentimentIndex in the History Tester.
This is my code:
public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
long time = askBar.getTime();
IFXSentimentIndex index = dataService.getFXSentimentIndex(instrument, time);
console.getOut().println(String.format("FXSI | %s | %s | %.5f", sdf.format(time), sdf.format(index.getIndexTime()), index.getIndexValue()));
}
and the output:
Quote:
2016-04-19 21:31:27 FXSI | 2016-04-17 20:00:00.000 | 2016-02-23 14:31:41.000 | 57.92000
2016-04-19 21:31:27 FXSI | 2016-04-17 20:30:00.000 | 2016-02-23 14:31:41.000 | 57.92000
2016-04-19 21:31:27 FXSI | 2016-04-17 20:45:00.000 | 2016-02-23 14:31:41.000 | 57.92000
2016-04-19 21:31:27 FXSI | 2016-04-17 20:50:00.000 | 2016-02-23 14:31:41.000 | 57.92000
2016-04-19 21:31:27 FXSI | 2016-04-17 20:55:00.000 | 2016-02-23 14:31:41.000 | 57.92000
2016-04-19 21:31:27 FXSI | 2016-04-17 20:59:00.000 | 2016-02-23 14:31:41.000 | 57.92000
2016-04-19 21:31:27 FXSI | 2016-04-17 20:59:50.000 | 2016-02-23 14:31:41.000 | 57.92000
2016-04-19 21:31:27 FXSI | 2016-04-17 20:59:40.000 | 2016-02-23 14:31:41.000 | 57.92000
2016-04-19 21:31:27 FXSI | 2016-04-17 20:59:30.000 | 2016-02-23 14:31:41.000 | 57.92000
2016-04-19 21:31:27 FXSI | 2016-04-17 20:59:20.000 | 2016-02-23 14:31:41.000 | 57.92000
The last index value is 8 weeks old!Or I made a mistake somewhere?