Edit: this has been moved from "bug reports" to "knowledge base". Why?
Upon restart of a strategy (i.e. start-stop-start), variables etc retain the values from the previous instance.. both in live and demo.
Simple example (should always print "0" but does not):
package jforex;
import com.dukascopy.api.*;
public class SampleStrategy implements IStrategy {
int check = 0;
public void onStart(IContext context) throws JFException {
context.getConsole().getOut().println(check++);
}
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 {
}
}