This is my first attempt, I didn't run this on demo yet (just on tester).
here are some blocks:
public void onMessage(IMessage message) throws JFException {
CurrentContext.getConsole().getNotif().println(message.getContent());
if (message.getType()==IMessage.Type.SENDING_ORDER)
{
CurrentContext.getConsole().getNotif().println("SENDING ORDER");
}
}
CurrentContext is defined as
private IContext CurrentContext = null;
and receives value in OnStart:
CurrentContext = context;
far down in the code there is:
try {
CurrentContext.getConsole().getNotif().println("before try");
IOrder order = CurrentContext.getEngine().submitOrder(commBuy, Instr, IEngine.OrderCommand.BUY, defaultAmount);
CurrentContext.getConsole().getNotif().println("tried"); }
catch (JFException e) {e.printStackTrace();}
What I get as message is just "before try". It doesn't reach "tried" and there is no SENDING ORDER or other kind of message. Why this?