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.

order.Close with GoodTillTime ?
 Post subject: order.Close with GoodTillTime ? Post rating: 0   New post Posted: Thu 20 Sep, 2012, 14:40 

User rating: 0
Joined: Wed 27 Jun, 2012, 15:37
Posts: 11
Hi,

There is no GootTillTime parameter in the order.Close function, as for engine.Submit.

What's the best practice to manage a GootTillTime while closing order ?

Thanks


 
 Post subject: Re: order.Close with GoodTillTime ? Post rating: 0   New post Posted: Fri 21 Sep, 2012, 08:09 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
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


 

Jump to:  

cron
  © 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