Closed GoogleCodeExporter closed 9 years ago
I don't know how this kind of fix would fit within your architecture, but in a
similiar manner to:
ch.aonyx.broker.ib.api.OrderIdInternalIdBinding.addAndBind(final Request request);
change
ch.aonyx.broker.ib.api.OrderIdInternalIdBinding.getOrderId(final int internalId);
to:
Id getOrderId(final int internalId) {
Id newId = binding.inverse().get(internalId);
if(newId == null && internalId != 0) {
newId = sequence.getAndIncrement();
binding.put(internalId, newId);
}
return newId;
}
Original comment by drew.so...@gmail.com
on 30 Mar 2013 at 1:29
Original comment by cmarco...@gmail.com
on 1 Apr 2013 at 7:53
Thank you for looking at this! Let me know if I can assist you in any way! :-)
It's a lot easier to get the bug fixed at the maven source, so I don't have to
manage the dependencies myself, so I am very appreciative of you looking at
this!
Original comment by drew.so...@gmail.com
on 1 Apr 2013 at 7:56
Hello,
First of all, your solution to fix the problem is not good as sequence is an
AtomicInteger object and newId is an Id object.
Second of all you are using negative order id IB generation. So the solution to
always increment is not good also.
Have you tried using positive order id generation ? (It won't fix the problem
with the RetrieveOpenOrderRequest)
Original comment by cmarco...@gmail.com
on 1 Apr 2013 at 8:12
Check for positive and negative order id generation to increment or decrement.
Create on the fly OrderId when retrieving open orders from IB when orders were
not generated by Neo API.
Original comment by cmarco...@gmail.com
on 1 Apr 2013 at 8:47
Original issue reported on code.google.com by
drew.so...@gmail.com
on 30 Mar 2013 at 1:21Attachments: