No matter how I try to access the Lists obtained from ITesterReportData, they are always 'null'. Am I missing something, or it also does not work for you? Please see the files I've attached.
Code: public void onStop(long processId) {
LOGGER.info("Strategy stopped: " + processId);
File reportFile = new File("C:\\report.html");
try {
client.createReport(processId, reportFile);
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
}
ITesterReportData reportData = client.getReportData(processId);
System.out.println("MA_play.trades:\t" + MA_Play.trades);
System.out.println("getStrategyName():\t" + reportData.getStrategyName());
System.out.println("getInitialDeposit():\t" + reportData.getInitialDeposit());
System.out.println("getFinishDeposit():\t" + reportData.getFinishDeposit());
System.out.println("getOpenOrders():\t" + reportData.getOpenOrders());
System.out.println("getClosedOrders():\t" + reportData.getClosedOrders());
System.out.println("getParameterValues():\t" + reportData.getParameterValues());
System.out.println("getPerfStats():\t" + reportData.getPerfStats());
if (client.getStartedStrategies().size() == 0) {
System.exit(0);
}
}
Output:MA_play.trades: 61
getStrategyName(): singlejartest.MA_Play
getInitialDeposit(): 50000.0
getFinishDeposit(): 49995.25
getOpenOrders(): null
getClosedOrders(): null
getParameterValues(): null
getPerfStats(): null
The report.html is created and it contains the data, but the Lists are empty. Why?