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.

Questions regarding place bid / offer
 Post subject: Questions regarding place bid / offer Post rating: 0   New post Posted: Fri 18 Nov, 2011, 10:51 

User rating: 4
Joined: Mon 19 Sep, 2011, 09:55
Posts: 29
Location: Germany,
Hello! I have a few questions regarding place bid / offer (IEngine.OrderCommand.PLACE_BID, IEngine.OrderCommand.PLACE_OFFER):

Context is as follows:

I'd like to mimic an immediate-or-cancel style of order. For the purpose I'd place a bid / offer onto the current ask / bid or better, respectively, with a small time-to-live (goot-till-time) interval, say 1000 millis.

-Is there a limit as to how small (>0) this interval can be?


-In this case the method submitOrder(label, instrument, orderCommand, amount, price, slippage, stopLossPrice, takeProfitPrice, goodTillTime) has to be used at least. What, in this context, is the meaning of the slippage parameter? — I assume it has to be set to Double.NaN?



Or do you have another suggestion, as to how to implement an ioc-style order (i.e. if the order cannot be executed at preferred price immediately, it is canceled immediately), I cannot see how this can be done directly with the implemented submitOrder(..) methods and order command types.

Regards


 
 Post subject: Re: Questions regarding place bid / offer Post rating: 0   New post Posted: Fri 18 Nov, 2011, 13:53 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
astro wrote:
-Is there a limit as to how small (>0) this interval can be?
No there is no such limit, note that if you set the goodTillTime parameter to 0, then you will remove the "Good till"condition.
astro wrote:
-In this case the method submitOrder(label, instrument, orderCommand, amount, price, slippage, stopLossPrice, takeProfitPrice, goodTillTime) has to be used at least. What, in this context, is the meaning of the slippage parameter? — I assume it has to be set to Double.NaN?
Slippage is int (it is measured in pips) and it does not get applied for bids and offers. Thus, you can use any arbitrary value >=0.
astro wrote:
Or do you have another suggestion, as to how to implement an ioc-style order (i.e. if the order cannot be executed at preferred price immediately, it is canceled immediately), I cannot see how this can be done directly with the implemented submitOrder(..) methods and order command types.
See the example:
https://www.dukascopy.com/wiki/index.php?title=Place_Bid


 

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