tymorapro wrote:
That's my point, though. The orders ARE already fully-filled.
And while there are things such as FULLY FILLED messages, messages can be missed especially
on disconnects, so it would also make sense if we could ask JForex for it's current order status.
Alternative is to check if order requested amount equals the fill amount, i.e.:
Double.compare(IOrder.getRequestedAmount(),IOrder.getAmount())==0
Thus there is no extra
IOrder.Status necessary.
tymorapro wrote:
As such, I've also determined that the reason for my double-fills is that if you try and MODIFY the
PRICE of an order while Dukascopy is in the process of FILLING the same order (assuming both orders
are at a price that can be immediately filled), you will likely get a double-fill. Here is my trade log that
shows this precisely:
order sent to JForex -> JForexID:44487973 date:20121125 time:201029 SELL 3000 #EURUSD 1.2963 typ:LMT myID:DM86/1
order MODIFIED via setOpenPrice() -> JForexID:44487973 date:20121125 time:201029 SELL 3000 #EURUSD 1.2964 typ:LMT myID:DM86/1
TWO EXECUTIONS for 3000 each, same JForexID, different JForex EXECUTION ID:
EXE| execID:171227082 JForexID:44487973 date:20121125 time:201030 SELL 3000 #EURUSD 1.29646 myID: DM86/1 msg:ORDER FILLED, SOLD 3000 #EURUSD AT 1.29646
EXE| execID:171227085 JForexID:44487973 date:20121125 time:201030 SELL 3000 #EURUSD 1.29646 myID: DM86/1 msg:ORDER FILLED, SOLD 3000 #EURUSD AT 1.29646
EXE|171227085|44487973|20121125|201030|S|3|#EURUSD|1.29646|SWFX|DM86/1|ORDER FILLED, SOLD 3 #EURUSD AT 1.29646|
As such, my immediate solution is to completely cancel an order and send a new one instead of attempting to MODIFY an active JForex order. So far, the problem hasn't come up again since I made that change.
I would appreciate any updates Dukascopy can offer as to having this bug / glitch corrected.
Thank you again for your assistance with this.
The issue has been registered and will be investigated as soon as available. Please refer to
viewtopic.php?t=48368