Hello Support,
Trying to do some testing with the new platform.
The following code can be compiled, but upon start, I got
Class not accepted message.
package jforex;
import java.util.*;
import com.dukascopy.api.*;
import com.dukascopy.api.feed.IFeedDescriptor;
import com.dukascopy.api.feed.IFeedListener;
import com.dukascopy.api.feed.IRenkoBar;
import com.dukascopy.api.feed.IRenkoBarFeedListener;
import com.dukascopy.api.feed.util.RenkoFeedDescriptor;
public class RenkoTest implements IStrategy, IFeedListener {
@Configurable("")
public IFeedDescriptor renkoFeedDescriptor = new RenkoFeedDescriptor(Instrument.EURUSD, PriceRange.valueOf(10), OfferSide.ASK);
private IConsole console;
public void onStart(IContext context) throws JFException {
this.console = context.getConsole();
context.setSubscribedInstruments(java.util.Collections.singleton(renkoFeedDescriptor.getInstrument()), true);
context.subscribeToFeed(renkoFeedDescriptor, this);
}
@Override
public void onFeedData(IFeedDescriptor feedDescriptor, ITimedData feedData) {
console.getOut().println(feedData);
}
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 {}
}
Could you help me out.
Thanks!