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.setStopLossPrice() invocation requires context.executeTask() wrapper?
 Post subject: order.setStopLossPrice() invocation requires context.executeTask() wrapper? Post rating: 0   New post Posted: Tue 13 Mar, 2012, 20:53 

User rating: 3
Joined: Mon 23 May, 2011, 16:06
Posts: 17
Location: Hungary,
Dear Support,

I've read in the API Javadoc that users have to use context.executeTask() for submitting orders from threads other than that of the concerning strategy. Is this obligation stands for order.setStopLossPrice() too? (I'd like to invoke setStopLossPrice() from a TimerTask to avoid too frequent stop-loss change requests.)

Thanks, regards,
Argiris


 
 Post subject: Re: order.setStopLossPrice() invocation requires context.executeTask() wrapper? Post rating: 0   New post Posted: Wed 14 Mar, 2012, 08:56 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Argiris wrote:
Is this obligation stands for order.setStopLossPrice() too?
Yes, all trade-related operations need to be done in the strategy thread OR when called from another thread the Callable task needs to be executed in IContext.executeTask. See:
https://www.dukascopy.com/wiki/#Threading


 

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