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.

Place bid - offer on Order closing ??
 Post subject: Place bid - offer on Order closing ?? Post rating: 0   New post Posted: Thu 26 Jan, 2012, 00:21 

User rating: 0
Joined: Tue 17 Jan, 2012, 19:57
Posts: 17
Hello

Is it possible to close an order in a PLACE_BID or PLACE_OFFER way ?
I know we can close with a preferred price, is that just a limit order or is it possible to place a bid or offer for closing an order ?

Thanks
jfwhites


 
 Post subject: Re: Place bid - offer on Order closing ?? Post rating: 0   New post Posted: Thu 26 Jan, 2012, 09:17 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
jfwhites wrote:
Is it possible to close an order in a PLACE_BID or PLACE_OFFER way ?
Please elaborate
jfwhites wrote:
I know we can close with a preferred price, is that just a limit order or is it possible to place a bid or offer for closing an order ?
Please provide an example.

For orders start here:
https://www.dukascopy.com/wiki/#Orders_overview
This has subsections:
https://www.dukascopy.com/wiki/#Place_Bid
https://www.dukascopy.com/wiki/#Place_Offer
Also see wiki section Platform Manual/Order types.


 
 Post subject: Re: Place bid - offer on Order closing ?? Post rating: 0   New post Posted: Thu 26 Jan, 2012, 17:21 

User rating: 0
Joined: Tue 17 Jan, 2012, 19:57
Posts: 17
Hello

OK then let me phrase it differently.
Let's say you open a LONG position on EURUSD. This can be opened using PLACE_BID or BUY_LIMIT in order to enter with a limit price . So we know that the PLACE_BID order has some advantages.
Let's say now you want to close this position. From what I see in the documentation there is only one way to close with a "preferred price" is to use
order.close(amount , price, slippage).
So can you explain what is really the expected behaviour here. Does it appear like an OFFER at the price specified or it just a limit order ?
Hope that clarifies my original question.

Thanks


 
 Post subject: Re: Place bid - offer on Order closing ?? Post rating: 0   New post Posted: Fri 27 Jan, 2012, 15:06 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
jfwhites wrote:
So can you explain what is really the expected behaviour here. Does it appear like an OFFER at the price specified or it just a limit order ?
No, it is immediate or rejected type of order, see more in javadocs and example in wiki:
https://www.dukascopy.com/wiki/#Close_Orders/Partial_close_by_price


 
 Post subject: Re: Place bid - offer on Order closing ?? Post rating: 0   New post Posted: Fri 27 Jan, 2012, 15:56 

User rating: 0
Joined: Tue 17 Jan, 2012, 19:57
Posts: 17
Thank you

so it is immediate or cancel. good to know


 
 Post subject: Re: Place bid - offer on Order closing ?? Post rating: 0   New post Posted: Thu 22 Mar, 2012, 16:25 
User avatar

User rating: 21
Joined: Thu 19 May, 2011, 20:50
Posts: 413
Location: Germany, Munich
Dear Support,

is there any plan to implement place bid / offers for closing purposes as well?


 
 Post subject: Re: Place bid - offer on Order closing ?? Post rating: 0   New post Posted: Fri 23 Mar, 2012, 09:50 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please elaborate


 
 Post subject: Re: Place bid - offer on Order closing ?? Post rating: 0   New post Posted: Fri 23 Mar, 2012, 11:28 
User avatar

User rating: 21
Joined: Thu 19 May, 2011, 20:50
Posts: 413
Location: Germany, Munich
What I mean is if there is a filled order and a strategy wants to close this order whith a place bid / offer it should work like this:
* If the order is long it should be able to place an offer at a price level.
* If the order is short it should be able to place a bid at a price level.
If bid/ask price hits this price level the order is closed or patially closed depending on the achieved volume.

The great advantage is that there is no negative slippage if this is possible.


 
 Post subject: Re: Place bid - offer on Order closing ?? Post rating: 0   New post Posted: Tue 27 Mar, 2012, 11:28 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
SFXbernhard wrote:
The great advantage is that there is no negative slippage if this is possible.
There is no negative slippage also when you close the order with the following method:
https://www.dukascopy.com/client/javadoc/com/dukascopy/api/IOrder.html#close(double,%20double,%20double)
and set slippage to 0.

Alternative, within the current implementation of the API, is creating an opposite side BID/OFFER and merging the orders after full fill of the BID/OFFER.


 

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