Hi jimmy:
you can use this example of one of my articles:
if (message.getTye == IMessage.Type.ORDER_CLOSE_OK) {
// suposing you have this boolean variable to check if strategy can submit any order
canTrade = true;
myOrder = message.getOrder();
// outputs to console tab the value on our currency of profit/loss
myConsole.getOut().println("---------------------------------------------------");
myConsole.getOut().println("Order closed:" + myOrder.getLabel());
myConsole.getOut().println("---------------------------------------------------");
myConsole.getOut().println("Profit or Loss value:" + myOrder.getProfitLossInAccountCurrency());
myConsole.getOut().println(" Profit or Loss in Pips:" + myOrder.ProfitLossInPips());
}
I hope that helps
Trade well and good luck
JL