I'd like to respectfully submit what I believe to be a bug where a Strategy Client has no alternative but to cancel a partially filled order and then to close it, without achieving a complete fill. This occurs when the Strategy Client uses PLACE_BID or PLACE_OFFER order types. (my email is
[email protected]) On achieving a partial fill, the Strategy Client wishes to adjust the price to enable further fills, but the request is rejected.
I've tried to include actual error messages showing this, but please contact if you need further info. Thanks in advance !!
A suspected bug in JForex Strategy client processing of PLACE_BID or PLACE_OFFER. Please evaluate and correct this behavior so that Strategy Client can adjust the order price to achieve a complete fill.
These orders of type PLACE_BID or PLACE_OFFER frequently experience partial fills of sub-micro lot sizes. When this happens, the Strategy client is denied any attempt to change the order PRICE on the ECN so that a complete fill could be achieved.
Actual Example: PLACE_OFFER for 0.005 is placed and accepted.
2012-08-24 19:18:55 OFFER ACCEPTED: #64327337 PLACE OFFER 0.005 mil. EUR/USD @ 1.25156 EXPIRES: GTC - Position #15462269
PLACE_OFFER for lot size 0.005 is partially filled at 0.0004. Remaining unfilled quantity is therefore 0.0046. Strategy module attempts to change order price so that remaining unfilled amount can be filled on the ECN, but request is denied.
Original order id #64327337 becomes the "Parent Order" of the new PLACE_OFFER #64327350 shown below:
Strategy client attempts to change the order using the Parent Order (original) order ID #64327337. (Is there a way for it to discover the order ID of #64327350 and attempt to change that instead??) The Strategy Client refers to the order by the original order ID #64327337
Problem #1: Strategy client cannot change the order price. JForex error message is:
19:19:43 Order can't be processed: order in FILLED state, order #64327350 Parent Order #64327337 PLACE OFFER 0.0004 mil. EUR/USD @ 1.25156 EXPIRES: GTC
(Orders are placed in the FILLED state when they are only partially filled. But the order is not completely filled, which would place it in the OPENED state, I believe... The API appears not to correctly distinguish the only partially filled state, and disallows a change in price of the remaining order.)
Strategy is therefore forced to cancel the partially filled order:
2012-08-24 19:22:49 CANCELLING: #64327337 PLACE OFFER 4.6 thousand EUR/USD @ 1.25156 EXPIRES: GTC
As you can see it states that the PLACE_OFFER 4.6 (0.0046) remains unfilled, as 0.0004 was filled by the PLACE_OFFER on the ECN.
Client attempts to place an order for lot 0.0004 but is denied
2012-08-24 19:23:16 Order REJECTED: PLACE BID EUR/USD, REASON: Order amount: 0.0004000 can't be less than minimum allowed: 0.001000
Client has no alternative but to close the order, and JForex platform manual close yields this message
2012-08-24 19:24:13 Closing order BUY 400 EUR/USD @ MKT had been sent at 2012-08-24 19:24:13.774 GMT manually
followed by acknowledgement of the closure of the position
2012-08-24 19:24:14 Order FILLED at 1.25149 USD (#64327588 BUY 0.0004 mil. EUR/USD @ MKT MAX SLIPPAGE 0.0004) - Position #15462269