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.

Strategies and threads
 Post subject: Strategies and threads Post rating: 0   New post Posted: Fri 03 Jun, 2011, 16:19 

User rating: -
I have a couple of questions regarding strategies and threads:

1. Does each strategy run in its own thread?
2. Can new threads be spawned in a strategy?
3. If new ticks come in while the onTick method is still executing, are those ticks ignored or queued up?


 
 Post subject: Re: Strategies and threads Post rating: 0   New post Posted: Mon 06 Jun, 2011, 15:42 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
macronetics wrote:
1. Does each strategy run in its own thread?
Yes.
macronetics wrote:
2. Can new threads be spawned in a strategy?
Yes, see:
https://www.dukascopy.com/wiki/index.php?title=Threading
macronetics wrote:
3. If new ticks come in while the onTick method is still executing, are those ticks ignored or queued up?
See:
https://www.dukascopy.com/wiki/index.php ... ion_policy


 
 Post subject: Re: Strategies and threads Post rating: 0   New post Posted: Mon 06 Jun, 2011, 16:12 
User avatar

User rating: 0
Joined: Fri 27 May, 2011, 18:24
Posts: 2
Location: US
Another Question:

* Does each instance of a strategy run independent of each other? (ie. Does each call to client.startStrategy() run on a separate virtual account and not the same account?)


 
 Post subject: Re: Strategies and threads Post rating: 0   New post Posted: Mon 06 Jun, 2011, 16:35 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
They run on the same account. In fact if you run multiple strategies against live data from the same IClient instance and open JForex client you shall see orders from all of the strategies.


 

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