Dukascopy
 
 
Wiki JStore Search Login

APICLIENT-276 IOrder.setOpenPrice for partially filled orders
 Post subject: APICLIENT-276 IOrder.setOpenPrice for partially filled orders Post rating: 0   New post Posted: Fri 24 Aug, 2012, 21:06 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
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


 
 Post subject: Re: APICLIENT-276 IOrder.setOpenPrice for partially filled orders Post rating: 0   New post Posted: Wed 29 Aug, 2012, 21:45 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
Thank you for considering this.

Of course, I do not know how this would affect your entire system, but it seems to me that it should be possible to change the Price of an order even though it is partially filled.

I just haven't ever seen an order processing system which would prevent adjusting the price of an order, which was partially filled, with the goal of achieving a fill.

Particularly in the case of PLACE_BID and PLACE_OFFER because it is highly likely that partial fills will occur, and if they are extremely small fill quantities (below the minimum order size) then the client's goals are very much disrupted, and it's difficult to know what to do to correct the situation other than to use close() to close the position/order.

Please consider somehow permitting orders to be modified (within reason) in Price, at least, even though they are partially filled. Modifying other attributes seem far less important, so I am not at all asking for anything more than modification of Price, particularly for PLACE_BID and PLACE_OFFER order types.

This order system is one of the best I've seen, with the exception of this restriction.


 
 Post subject: Re: APICLIENT-276 IOrder.setOpenPrice for partially filled orders Post rating: 0   New post Posted: Tue 11 Sep, 2012, 18:51 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
Is there any response to this request? Because of any partial fill places the order in the FILLED state, and it therefore cannot be changed in price, this restriction effectively makes a PLACE_BID or PLACE_OFFER strategy almost unusable, since "micro fills" will disable the Order's price ever being changed, and these "micro fills" occur frequently.

Thanks for evaluating this request.


 
 Post subject: Re: APICLIENT-276 IOrder.setOpenPrice for partially filled orders Post rating: 0   New post Posted: Wed 12 Sep, 2012, 07:33 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
If the issue has a number, then it has been registered. If it is in "Implemented Requests", then it should be available with the next JForex-API release.


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com