Hello,
I've searched in the forum but I didn't found a working solution.
I'm partialy closing an order using
order.close.(double amount)
Just to try, I did this after the partial close :
public void onMessage(IMessage message) throws JFException {
if (message.getType() == IMessage.Type.ORDER_CLOSE_OK) {
IOrder closedOrder = message.getOrder();
closedOrder.close();
}
}
closedOrder.close() throws this exception :
Strategy tester: com.dukascopy.api.JFException: Cannot close order in CREATED, CLOSED or CANCELED state, current state - [CLOSED] @ jforex.FXbreakoutMulti.onMessage(FXbreakoutMulti.java:134)
So how to close totally a partialy closed order since its state isn't "filled" anymore ?
Thanks