I have two problems in latest version of Jforex3 (v3.2.16).
1. I manually subscribe to roughly 20 instruments, but at some (unpredicatble) time _after_ restart of the platform number of subscribed instruments is automatically reset to 10. This does not happen every restart, but does happen during restarts within a day or two. After that i have to manually review which instruments are missing from the thoroughly selected list and re-add them - this is rather time consuming and very annoying.
2. To workaround that problem i've tried to automate re-adding instruments from plugin, but this does not work
- after i subscribe to ticks feed platform still says
"Instrument [XXX/YYY] is not subscribed"
Here is the simple code to reproduce:
package jforex;
import com.dukascopy.api.*;
import com.dukascopy.api.plugins.*;
import com.dukascopy.api.feed.ITickFeedListener;
public class SubscriptionTestPlugin extends Plugin implements ITickFeedListener {
private IPluginContext context;
public void onStart(IPluginContext context) throws JFException {
this.context = context;
try {
Instrument i = Instrument.fromString("GBP/CAD");
context.subscribeToTicksFeed(i, this);
context.getHistory().getLastTick(i); // com.dukascopy.api.JFException: Instrument [GBP/CAD] is not subscribed
}
catch( Exception e ) {
e.printStackTrace(context.getConsole().getErr());
}
}
public void onStop() throws JFException {
}
public void onTick(Instrument instrument, ITick tick) {
}
}