>
>
> I can run the test tomorrow but can you clarify one thing for me.
> Let's say I start two JBT instances
> on two computers that have perfectly synchronized clocks. Will both
> data files be mostly
> identical even though forward-test on the second instance was started
> 0.5 seconds after the first one?
>
>
I didn't think about this initially, but now that you mentioned it, yes, two
computers with pefectly synchronized clocks would not sample the same
1-second periods if one started 0.5 seconds after another. That's because
the line

scheduler.scheduleAtFixedRate(new SnapshotHandler(), 0, 1,
TimeUnit.SECONDS);

in StrategyRunner.java starts the time immediately. This should be easy to
fix by changing the second parameter, which is "initialDelay", to the value
which would start the timer "on the second":

long initialDelay = 1000 - System.currentTimeMillis() % 1000;
        scheduler.scheduleAtFixedRate(new SnapshotHandler(), initialDelay,
1000, TimeUnit.MILLISECONDS);

Can you make that code adjustments for tomorrow's test?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"JBookTrader" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jbooktrader?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to