using the JForex API example (singlejartest), consider the following code added:
Calendar start = Calendar.getInstance();
start.set(2009, 1, 1);
Calendar stop = (Calendar) start.clone();
stop.add(Calendar.MONTH,1);
client.setDataInterval(Period.TICK, OfferSide.ASK, null, start.getTimeInMillis(), stop.getTimeInMillis());
the tester appears to use a start and end date that is off by one month, see log output below. Also, since we are using TICKS why do we get a message about time not being valid ? there are no bars start with ticks...
2010-07-26 11:51:33.027 INFO TesterMain - Starting strategy
2010-07-26 11:51:33.043 INFO TesterMain - Strategy started: 1
2010-07-26 11:51:33.054 INFO TesterMain - Getting prices before start time
2010-07-26 11:51:33.060 ERROR r - Time is not valid candle start time for period requested
com.dukascopy.charts.data.datacache.DataCacheException: Time is not valid candle start time for period requested
at com.dukascopy.charts.data.datacache.p.<init>(Unknown Source)
at com.dukascopy.charts.data.datacache.b.b(Unknown Source)
at com.dukascopy.charts.data.datacache.b.a(Unknown Source)
at com.dukascopy.dds2.greed.agent.strategy.tester.r.run(Unknown Source)
at java.lang.Thread.run(Thread.java:637)
2010-07-26 11:51:33.062 INFO TesterMain - Creating data loading threads
2010-07-26 11:51:33.484 INFO TesterMain - Getting prices before start time
2010-07-26 11:51:33.534 INFO TesterMain - Filling in-progress candles
2010-07-26 11:51:33.562 INFO TesterMain - Executing onStart
Started
2010-07-26 11:51:33.564 INFO TesterMain - Running
2010-07-26 11:51:33.578 INFO TesterMain - Running, 2009.02.01 11:00 Eq: 100000 UoL: 0%
2010-07-26 11:51:33.613 INFO TesterMain - Running, 2009.02.01 11:30 Eq: 100000 UoL: 0%
2010-07-26 11:51:33.628 INFO TesterMain - Running, 2009.02.01 12:00 Eq: 100000 UoL: 0%
2010-07-26 11:51:33.641 INFO TesterMain - Running, 2009.02.01 12:30 Eq: 100000 UoL: 0%
....