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 Post rating: 0   New post Posted: Wed 04 Jan, 2012, 16:05 

User rating: 0
Joined: Wed 14 Dec, 2011, 19:08
Posts: 7
Location: US
I need a way to test and debug partial fills with a DEMO account. How can I trigger a partial fill?


 
 Post subject: Re: Dealing with partial fills Post rating: 0   New post Posted: Wed 04 Jan, 2012, 16:06 

User rating: 0
Joined: Wed 14 Dec, 2011, 19:08
Posts: 7
Location: US
One specific question at hand is whixh order will engine.getOrder(Label) retreive if the order was filled in 2 parts?


 
 Post subject: Re: Dealing with partial fills Post rating: 0   New post Posted: Thu 05 Jan, 2012, 09:10 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
maxrolo wrote:
How can I trigger a partial fill?
Currently on DEMO, given that the margin is sufficient, all orders get filled at full - it is not possible to trigger partial fill.
maxrolo wrote:
which order will engine.getOrder(Label) retreive if the order was filled in 2 parts?
It will be the same order. Also the status in case of full and partial fill is the same - FILLED. The difference is that for partially filled orders IOrder.getAmount() < IOrder.getRequestedAmount(). If you want to cancel the unfilled.
See more in wiki https://www.dukascopy.com/wiki/:
order workflow - Strategy API/Orders/Overiew/Conditional order states diagram
cancelling unfilled part - Strategy API/Orders/Immediate Or Cancel order


 
 Post subject: Re: Dealing with partial fills Post rating: 0   New post Posted: Fri 02 Mar, 2012, 16:52 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Here is a strategy that creates partial fill. The trick is to specify slippage 0.


Attachments:
Strategy.java [1.73 KiB]
Downloaded 314 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Dealing with partial fills Post rating: 0   New post Posted: Mon 03 Sep, 2012, 18:37 

User rating: 0
Joined: Mon 03 Sep, 2012, 15:25
Posts: 8
I have tried this on a demo account, and caanot obtain any partial fills


 
 Post subject: Re: Dealing with partial fills Post rating: 0   New post Posted: Tue 04 Sep, 2012, 09:57 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Try it then with a smaller volume instrument, like USD/DKK.


 
 Post subject: Re: Dealing with partial fills Post rating: 0   New post Posted: Tue 04 Sep, 2012, 15:58 

User rating: 0
Joined: Mon 03 Sep, 2012, 15:25
Posts: 8
first of all for some odd reason USD/DKK is not available on my terminal

However I have been trying with XAG/USD for a while with no success


 

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