astro wrote:
Now, can you explain to me what happened in this example:
2011-11-28 09:01:14 Order FILLED at 1.33603 USD (Parent Order #42517293 PLACE OFFER *** mil. EUR/USD @ 1.33603 EXPIRES after: 09 hour 01 min 13 sec) - Position #9073343
2011-11-28 09:01:12 OFFER ACCEPTED: #42517293 PLACE OFFER *** mil. EUR/USD @ 1.33595 EXPIRES: 2011-11-28 09:01:13 - Position #9073343
2011-11-28 09:01:12 Order PLACE OFFER ***** EUR/USD @ 1.33595 EXPIRES:2011-11-28 09:01:13.843 GMT is sent at 2011-11-28 09:01:12.891 GMT by the strategy
The part that reads "EXPIRES after: 09 hour 01 min 13 sec" was not intended. The expiration date has clearly been set to approximately +1 second after the time the order has been sent!
This is due to platform time formatting, which does not include milliseconds. Expiry time on server works with your given time in milliseconds.
astro wrote:
It is truly regrettable that Dukascopy does not support IOC orders. How to emulate IOC?
The principle gets applied to Market orders, for conditional orders you can always do it within your strategy. Consider adjusting the
onMessage method of the strategy example in
https://www.dukascopy.com/wiki/index.php?title=Place_Bid to the following:
@Override
public void onMessage(IMessage message) throws JFException {
if(message.getType() == IMessage.Type.ORDER_SUBMIT_OK && message.getOrder() == this.order){
order.waitForUpdate(500);
//order not filled 0.5 secs after opening - cancel it
if(order.getState() != IOrder.State.FILLED){
order.close();
}
}
//print all order related messages
if(message.getOrder() != null){
console.getOut().println(sdf.format(message.getCreationTime()) + " " +message);
}
}
Also see:
https://www.dukascopy.com/wiki/index.php ... es_diagramastro wrote:
When using market orders with slippage, does this warrant that the order will not be executed past slippage?
Yes.