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.

Re: reason for double-fill via JForex API?
 Post subject: Re: reason for double-fill via JForex API? Post rating: 0   New post Posted: Thu 22 Nov, 2012, 01:48 

User rating: 0
Joined: Thu 15 Sep, 2011, 07:48
Posts: 4
Location: United States,
On a separate note, I'd also like to suggest that it would be much smoother, easier, and reliable if JForex API offered a simple way to cancel an open order in any active state without closing out any open position (partial or otherwise) - ie. order.cancel(). Having to figure out when to use close() and/or setRequestedAmount is tricky, and depending on how they're used could lead to potential overlooked threading issues in the JForex API. I also merge orders after they appear to have been fully filled, so I wonder if the problem could be associated with that as well.


 
 Post subject: Re: reason for double-fill via JForex API? Post rating: 0   New post Posted: Fri 23 Nov, 2012, 08:51 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
tymorapro wrote:
Having to figure out when to use close() and/or setRequestedAmount is tricky
Regarding canceling order, IOrder.setRequestedAmount(0) is just an alternative to IOrder.close(). Hence, there is not much to figure out - simply use IOrder.close(). Please refer to the diagram:
https://www.dukascopy.com/wiki/#Order_state/Conditional_order_states_diagram
tymorapro wrote:
potential overlooked threading issues in the JForex API
Please elaborate.


 

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