Tezcatlipoca wrote:
I'd still like to know *why* this is happening, as my strategy is actually quite simple
It happens when you use some long running operations that blocks the strategy thread. It could be thread sleeps, or wait or locks on sychronized code or some slow operations like network access. Can't say more specifically without seeing the code.
Tezcatlipoca wrote:
Is it safe to conclude that a faster computer would be less likely to run into this problem?
No, it's not. All computers that can run java are fast enough to work with strategy in real time. No matter how fast is your CPU, if you block the thread with Thread.sleep or something like that, then you get this problem.
Tezcatlipoca wrote:
Also, does JForex automatically take advantage of multi-processors in a multi-processor machine?
Nothing does take advantage of multi-processors automatically. If you use threads, if you have and do some jobs in parallel then it runs on multiple processors and cores simultaneously and takes advantage of them. JForex does use threads, we do many operations that can take some time in separate threads, like operations with network. But they are not CPU intensive and simple machine with one CPU and one core should be enough.
Tezcatlipoca wrote:
Does the use of separate threads automatically take advantage of multi-processors?
Yes it takes advantage and no it doesn't do it "automatically". It depends on the jobs that the threads are doing. If thread does some CPU intensive operation then it takes advantage. If thread starts and waits for some event then it doesn't take advantage, because it's not running most of the time anyway.
You sould find the place where and why strategy thread is blocked, why it doesn't process bars like it should. Then you should rewrite that place in some other way to resolve the problem. The use of the threads can help, but maybe you just need to handle your situation in some other way. What you should do is not to block thread. It enters one of the methods like onTick and it should exit from it to be able to process next event, next bar or tick.