JForex ver. 3.4.9
API ver. 2.13.60
Strategies which has public variables could not running.
Sample 1: could be not run
package jforex;
import com.dukascopy.api.*;
public class Test1 implements IStrategy {
public int i;
public void onStart(IContext context) throws JFException {}
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 {}
}
Sample 2: could be run
package jforex;
import com.dukascopy.api.*;
public class Test2 implements IStrategy {
private int i;
public void onStart(IContext context) throws JFException {}
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 {}
}
Regards.