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.

Partial Fills and TakeProfit
 Post subject: Partial Fills and TakeProfit Post rating: 0   Post Posted: Wed 11 Nov, 2009, 15:29 

User rating: 0
Joined: Thu 17 Sep, 2009, 23:29
Posts: 7
When I submit a main order with a Takeprofit, each time the main order is partially filled, will the TP order adjust its amount automatically ? Idem for the StopLoss ?

Thank you,
Michel


 
 Post subject: Re: Partial Fills and TakeProfit Post rating: 0   Post Posted: Thu 12 Nov, 2009, 08:56 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
if you are using a DEMO account, could you please send us order id numbers?


 
 Post subject: Re: Partial Fills and TakeProfit Post rating: 0   Post Posted: Mon 16 Nov, 2009, 18:48 

User rating: 0
Joined: Thu 17 Sep, 2009, 23:29
Posts: 7
Support wrote:
Hi,
if you are using a DEMO account, could you please send us order id numbers?

It was just a question to know how to write my strategy, because it's not easy to check how the partial fills are working on backtests.
Up to now, I have no problems and not so much partial fills, but it might happen when the amounts will grow; that's why I would like to know what the behavior of the Takeprofit orders is intended to be: if their amounts will follow the amount of the partially filled main order or not.
And, if the main order is a Limit Order, if the amount of the TakeProfit Order will be automatically updated each time a subsequent partial fill of the main order occurs.

Thank you for your attention,
Michel


 
 Post subject: Re: Partial Fills and TakeProfit Post rating: 0   Post Posted: Tue 17 Nov, 2009, 15:02 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Quote:
Takeprofit orders is intended to be: if their amounts will follow the amount of the partially filled main order or not.
And, if the main order is a Limit Order, if the amount of the TakeProfit Order will be automatically updated each time a subsequent partial fill of the main order occurs.

Yes, it will follow main order. The amount of all partly filled orders could get by a IOrder.getAmount() function. It's a same for the Limit orders.
In JForex, if an order is partly filled, then its IOrder.State is set to FILLED. Use a function IOrder.getAmount() to know how far the order has been filled. Each time an partial fill happens the message IMessage.ORDER_CHANGED_OK is sent.


 

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