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.

How to cancel the nonfilled part of a partially filled order
 Post subject: How to cancel the nonfilled part of a partially filled order Post rating: 0   New post Posted: Thu 17 Dec, 2009, 19:45 

User rating: 0
Joined: Thu 17 Sep, 2009, 23:29
Posts: 7
How to cancel the nonfilled part of a partially filled order in a strategy ?
Thank you,

Michel


 
 Post subject: Re: How to cancel the nonfilled part of a partially filled order Post rating: 0   New post Posted: Tue 22 Dec, 2009, 17:28 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Use function setRequestedAmount(https://www.dukascopy.com/swiss/docs/api/com/dukascopy/api/IOrder.html#setRequestedAmount(double)).
Consider this example:
order.setRequestedAmount(0);


 
 Post subject: Re: How to cancel the nonfilled part of a partially filled order Post rating: 0   New post Posted: Wed 23 Dec, 2009, 15:43 

User rating: 0
Joined: Thu 17 Sep, 2009, 23:29
Posts: 7
Thank you for your reply, but SetRequestedAmount() apply to orders in state CREATED or OPENED.
Here the partially filled order is in state FILLED

At some point, the strategy needs to cancel the un-filled part of the order without closing its filled part. I do not see any way to do that, but it should be some !.

It might also happen that the partially filled part of the order is closed by hitting its TakeProfit, then the order is in state CLOSED and the un-filled part can probably be canceled by Close(), so this case seems easier.

Best Regards,
Michel


 
 Post subject: Re: How to cancel the nonfilled part of a partially filled order Post rating: 0   New post Posted: Tue 29 Dec, 2009, 09:46 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
We will make corrections in documentation to make it more clear.


 

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