Hi Support,
so I've come up with a simple strategy that reproduces the error:
import java.util.*;
import com.dukascopy.api.*;
import com.dukascopy.api.feed.IFeedDescriptor;
import com.dukascopy.api.feed.IFeedListener;
import com.dukascopy.api.feed.util.RangeBarFeedDescriptor;
public class TestStrategy2 implements IStrategy {
private IEngine engine;
private IConsole console;
private IHistory history;
private IContext context;
private IIndicators indicators;
private IUserInterface userInterface;
@Override
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();
IFeedListener strategyListener = new IFeedListener() {
@Override
public void onFeedData(IFeedDescriptor feedDescriptor, ITimedData feedData) {
console.getOut().println("range bar completed: " + feedData + " of feed: " + feedDescriptor);
}
};
IFeedDescriptor rangeBarFeedDescriptor = new RangeBarFeedDescriptor(Instrument.EURUSD, PriceRange.TWO_PIPS, OfferSide.ASK);
context.subscribeToFeed(rangeBarFeedDescriptor, strategyListener);
}
public void onAccount(IAccount account) throws JFException {
}
public void onMessage(IMessage message) throws JFException {
}
public void onStop() throws JFException {
}
public void onTick(Instrument instrument, ITick tick) throws JFException {
}
public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
}
}
As described above, I have a JForexLibs Maven project which was cleaned and rebuilt before testing this strategy through my StrategyManager Maven project (which was also cleaned and rebuilt).
Please post what version of open jre/jdk you are using to try and replicate this bug and what version of netbeans is being used too. My assumption is that you are also testing on a linux based distro.
Many thanks,
mm