The historical tester isn't testing all ticks when there is no cache available for that data.
This possibly could be just a multi-instrument bug since that is where I noticed and tested for.
I used the following basic strategy to test inside JForex platform:
package jforex;
import java.util.*;
import com.dukascopy.api.*;
public class DataCollection implements IStrategy {
private IEngine engine;
private IConsole console;
private IHistory history;
private IContext context;
private IIndicators indicators;
private IUserInterface userInterface;
public Instrument GBPUSD = Instrument.GBPUSD;
public Instrument EURGBP = Instrument.EURGBP;
public Instrument EURUSD = Instrument.EURUSD;
public int GBPUSDindex = 0;
public int EURGBPindex = 0;
public int EURUSDindex = 0;
public void onStart(IContext context) throws JFException {
this.engine = context.getEngine();
this.console = context.getConsole();
this.history = context.getHistory();
this.context = context;
this.indicators = context.getIndicators();
this.userInterface = context.getUserInterface();
Set<Instrument> instruments = new HashSet<Instrument>();
instruments.add(GBPUSD);
instruments.add(EURGBP);
instruments.add(EURUSD);
context.setSubscribedInstruments(instruments);
console.getOut().println("STARTUP");
}
public void onAccount(IAccount account) throws JFException {
}
public void onMessage(IMessage message) throws JFException {
}
public void onStop() throws JFException
{
console.getOut().println("GBPUSD TICK CALLS: "+GBPUSDindex);
console.getOut().println("EURUSD TICK CALLS: "+EURUSDindex);
console.getOut().println("EURGBP TICK CALLS: "+EURGBPindex);
}
public void onTick(Instrument instrument, ITick tick) throws JFException
{
if (instrument == GBPUSD)
{
GBPUSDindex++;
}
if (instrument == EURUSD)
{
EURUSDindex++;
}
if (instrument == EURGBP)
{
EURGBPindex++;
}
}
public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
}
}
I ran this program 3 times over the exact same period (2011 data).
NO CACHE (EMPTIED CACHE) RESULTS:
EURGBP onTick Calls: 3,225,001
EURUSD onTick Calls: 25,743,998
GBPUSD onTick Calls: 3,781,193
Report Stated 35,895,152 Internal Calls 32,750,192 OnTick Calls
SECOND RUN (WITH CACHE FROM FIRST RUN)
EURGBP onTick Calls: 21,797,295
EURUSD onTick Calls: 25,743,998
GBPUSD onTick Calls: 24,814,242
Report Stated 75,500,495 Internal Calls 72,355,535 OnTick Calls
THIRD RUN (WITH CACHE FIRST AND SECOND RUN)
EXACT RESULTS OF SECOND RUN
This is probably related to multi-instruments, but is rather significant as you would have to run a test twice if you have never used that data before or if you needed to clear your cache as in my case.