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.

How to wait for fully filled orders
 Post subject: How to wait for fully filled orders Post rating: 0   New post Posted: Mon 15 Jun, 2020, 06:54 
User avatar

User rating: 0
Joined: Mon 15 Jun, 2020, 06:52
Posts: 1
Location: AustraliaAustralia
IOrder.waitForUpdate() waits for state change, however, there's no unique state for fully filled orders (partially/fully filled orders share State.FILLED according to order state diagram)
To wait for full fill, I have to stay in a loop with timeout, waiting for order amount == requested amount. I'm wondering if there's a more efficient way to do this synchronously (i.e., without async notification from strategy's onMessage())

Thanks


 
 Post subject: Re: How to wait for fully filled orders Post rating: 0   New post Posted: Wed 01 Jul, 2020, 15:34 
Visual JForex expert at Dukascopy
User avatar

User rating:
Joined: Mon 22 Apr, 2013, 11:30
Posts: 604
Location: UkraineUkraine
Greetings.

Here is the most efficient solution. That is all that can be done.
https://www.dukascopy.com/wiki/en/devel ... rder-state

Regards.


 

Jump to:  

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