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 ... instrumentand:
https://www.dukascopy.com/wiki/index.php ... Ticks/Barsjapapatramtara 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_policyYou can also consider running some critical operations in a separate thread, see:
https://www.dukascopy.com/wiki/index.php?title=Threading