rafalm23 wrote:
some ticks can be dropped
The ticks are still there in the IHistory. If you find crucial the IStrategy.onTick execution on those ticks, then you can do it on the strategy start, e.g.:
public class ExecOnHistTicks implements IStrategy {
IHistory history;
Set<Instrument> instruments;
long offlineFrom, offlineTo;
public ExecOnHistTicks() {}
public ExecOnHistTicks(Set<Instrument> instruments, long offlineFrom, long offlineTo) {
this.offlineFrom = offlineFrom;
this.offlineTo = offlineTo;
this.instruments = instruments;
}
@Override
public void onStart(IContext context) throws JFException {
history = context.getHistory();
for (Instrument instrument : instruments) {
List<ITick> ticks = history.getTicks(instrument, offlineFrom, offlineTo);
for (ITick tick : ticks) {
onTick(instrument, tick);
}
}
}
//..
Here, of course, you would also need to make sure that in the
onTick you use history and indicator methods that use time and candle intervals, not shifted values.