Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Dealing with partial fills
 Post subject: Dealing with partial fills 2 Post rating: 0   New post Posted: Wed 11 Jan, 2012, 00:06 

User rating: 0
Joined: Wed 14 Dec, 2011, 19:08
Posts: 7
Location: US
if say an order was placed for 10 lots and 5 get filled at one price and 5 at another, it will still be 1 big order? impossible. at which price? Another scenario. close order at market. 5 get filled at 1 price and 5 at another, how will this work?


 
 Post subject: Re: JFOREX-3420 Dealing with partial fills Post rating: 0   New post Posted: Thu 12 Jan, 2012, 10:08 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
maxrolo wrote:
if say an order was placed for 10 lots and 5 get filled at one price and 5 at another, it will still be 1 big order?
Yes.
maxrolo wrote:
impossible. at which price?
At weighted average price (e.g. 0.2 fills for 1.5 and 0.8 fills for 1.4, IOrder.getPrice()=0.2*1.5 + 0.8*1.4=1.42).
maxrolo wrote:
Another scenario. close order at market. 5 get filled at 1 price and 5 at another, how will this work?
After partial close, the order remains filled, but with different amount. See diagram:
https://www.dukascopy.com/wiki/#Orders_o ... es_diagram
According to https://www.dukascopy.com/wiki/#Close_Orders In case of partial close:
    IOrder.getClosePrice() - price of the last partial close.
    IOrder.getCloseTime() - time of last partial close.
    order.getState() = FILLED while the order has not been closed completely.


 
 Post subject: Dealing with partial fills Post rating: 0   New post Posted: Fri 13 Jan, 2012, 00:34 

User rating: 0
Joined: Wed 14 Dec, 2011, 19:08
Posts: 7
Location: US
in the above scenario, when the first 5 were closed I assume A message of ORDER_CLOSE_OK will be sent. will another ORDER_CLOSE_OK message be sent at the close of the remainder?


 
 Post subject: Re: Dealing with partial fills Post rating: 0   New post Posted: Mon 16 Jan, 2012, 10:01 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
maxrolo wrote:
will another ORDER_CLOSE_OK message be sent at the close of the remainder?
Yes, Market order states diagram shows that and the following example strategy also demonstrates it:
https://www.dukascopy.com/wiki/#Close_Or ... se_example


 

Jump to:  

cron
  © 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