First of all -
goodTillTime is used only with
PLACE_BID and
PLACE_OFFER, see:
https://www.dukascopy.com/client/javadoc/com/dukascopy/api/IEngine.html#submitOrder(java.lang.String,%20com.dukascopy.api.Instrument,%20com.dukascopy.api.IEngine.OrderCommand,%20double,%20double,%20double,%20double,%20double,%20long,%20java.lang.String)Second - order close is either unconditional (
IOrder.close()) or with price condition (
IOrder.close(double price)), hence there is no time condition applicable for order close action. However you can implement this in your strategy by making a conditional order in opposite direction at a certain price and if it does not get filled in certain time then cancel the order, otherwise once the opposite-order gets filled, merge it with the original order. Find more explanations and examples here:
https://www.dukascopy.com/wiki/#Orders_overview