worstTradePnlDisplay.setText(df.format(worstTrade.getTradePnl()));
} else {
worstTradeTimeDisplay.setText("");
worstTradePnlDisplay.setText("");
}
SimplePoint maxDDEnd = tradeStatsProcessor.getEndOfMaxDrawdown();
if (maxDDEnd != null) {
maxDrawdownEndTimeDisplay.setText(sdf.format(maxDDEnd.getIndex()));
maxDrawdownValueDisplay.setText(df.format(maxDDEnd.getValue() - tradeStatsProcessor.getStartOfMaxDrawdown().getValue()));
} else {
maxDrawdownEndTimeDisplay.setText("");
maxDrawdownValueDisplay.setText("");
}
SimplePoint maxRUEnd = tradeStatsProcessor.getEndOfMaxRunup();
if (maxRUEnd != null) {
maxRunupEndTimeDisplay.setText(sdf.format(maxRUEnd.getIndex()));
maxRunupValueDisplay.setText(df.format(maxRUEnd.getValue() - tradeStatsProcessor.getStartOfMaxRunup().getValue()));
} else {
maxRunupEndTimeDisplay.setText("");
maxRunupValueDisplay.setText("");
}
SimplePoint lowestEP = tradeStatsProcessor.getLowestEquityPoint();
if (lowestEP != null) {
lowestEquityTimeDisplay.setText(sdf.format(lowestEP.getIndex()));
lowestEquityValueDisplay.setText(df.format(lowestEP.getValue()));
} else {
lowestEquityTimeDisplay.setText("");
lowestEquityValueDisplay.setText("");
}
SimplePoint highestEP = tradeStatsProcessor.getHighestEquityPoint();
if (highestEP != null) {
highestEquityTimeDisplay.setText(sdf.format(highestEP.getIndex()));
highestEquityValueDisplay.setText(df.format(highestEP.getValue()));
} else {
highestEquityTimeDisplay.setText("");
highestEquityValueDisplay.setText("");
}
tradesTableViewer.refresh();