Hi,
I found a reading bar error, but my strategy does not work in a "loop" - after order close strategy stops.
How to "copy" order after TP (and change direction after SL) ?
Where / how to write a loop of orders - after 1 closes another starts, ... ?
On Bar does not work.
public void onMessage(IMessage message) throws JFException {
if(message.getType() == IMessage.Type.ORDER_CLOSE_OK)
{
if (message.getReasons().contains(IMessage.Reason.ORDER_CLOSED_BY_TP)) {
// I want to copy last opened order instead of engine.submit(blablabla...)
....
}
else if (message.getReasons().contains(IMessage.Reason.ORDER_CLOSED_BY_SL)) {
// Change direction some quickly
....
}
...
}
}
May i have more IOrders ?
Thanks.