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 JForex processing ticks? Single or Multithread?
 Post subject: How JForex processing ticks? Single or Multithread? Post rating: 0   Post Posted: Fri 11 Nov, 2011, 10:48 

User rating: 0
Joined: Fri 11 Nov, 2011, 10:42
Posts: 1
Location: Czech Republic,
Well I have a simple question: Does JForex start for each instrument its own thread? I mean that in the middle of processing one instrument JForex will stop work and call onTick() method again with another instrument from another thread? Or how JForex processing ticks in general? Does he build some tick queue(FIFO) and call onTick() for each tick in queue in one thread? Or Does he use a stack instead queue(LIFO)? Or does he process ticks list in more than one threads?


 
 Post subject: Re: How JForex processing ticks? Single or Multithread? Post rating: 0   Post Posted: Fri 11 Nov, 2011, 11:40 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
japapatramtara wrote:
Well I have a simple question: Does JForex start for each instrument its own thread? I mean that in the middle of processing one instrument JForex will stop work and call onTick() method again with another instrument from another thread?
Strategy is being run in its own thread and ticks are fed to it as soon as they arrive. Thus, onTick gets called sequentially on ticks enqueued by their arrival time and onTick execution of one tick cannot be interrupted by onTick on another tick.
Also see:
https://www.dukascopy.com/wiki/index.php ... instrument
and:
https://www.dukascopy.com/wiki/index.php ... Ticks/Bars
japapatramtara wrote:
Or how JForex processing ticks in general? Does he build some tick queue(FIFO) and call onTick() for each tick in queue in one thread? Or Does he use a stack instead queue(LIFO)? Or does he process ticks list in more than one threads?
Ticks get fed to onTick by using queue, see more on the tick execution policy here: https://www.dukascopy.com/wiki/index.php ... ion_policy
You can also consider running some critical operations in a separate thread, see:
https://www.dukascopy.com/wiki/index.php?title=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